Paste named range from Excel to Powerpoint into named shape - VBA



I want to build a macro that connects our Excel-Data-Sheet with our Reporting-Powerpoint-Presentation.
So I have this named Range ("A") selected and copied.
Then I want to paste the data into a shape in Powerpoint which has the same name as my Range ("A").


Sub SyncWithPPT()
Dim pptApp As PowerPoint.Application
Dim pptPres As PowerPoint.Presentation
Dim pptShape As PowerPoint.Shape
Set pptApp = New PowerPoint.Application
pptApp.Visible = msoTrue
Set pptPres = pptApp.presentations.Open("workingPath")
ActiveWorkbook.Names("A").RefersToRange.Select
Selection.Copy
Set pptShape = pptPr

Related to : Paste named range from Excel to Powerpoint into named shape - VBA
How to access a named range in Excel-VBA with multiple areas?
Programming Languages

All works fine with a one-area range:
Select cells A1 and B1 and give it the name "foo".


?ThisWorkbook.Names.Item("foo").RefersTo
=Tabelle1!$A$1:$B$1
?ThisWorkbook.Names.Item("foo").RefersToRange.Address
$A$1:$B$1

However, two-area ranges will fail (Excel 2010):
Click cells A2 and B2 with ctrl pressed and give it the name "bar".


?ThisWorkbook.Names.Item("bar").RefersTo
=Tabelle1!$A$2,Tabelle1!$B$2
?ThisWorkbook.Names.Item("bar").RefersToRange.Address
-> Run-time error '1004'

Why can't we get the range the "bar"-name refers to?

Paste named range from Excel to Powerpoint into named shape - VBA
Programming Languages

I want to build a macro that connects our Excel-Data-Sheet with our Reporting-Powerpoint-Presentation.
So I have this named Range ("A") selected and copied.
Then I want to paste the data into a shape in Powerpoint which has the same name as my Range ("A").


Sub SyncWithPPT()
Dim pptApp As PowerPoint.Application
Dim pptPres As PowerPoint.Presentation
Dim pptShape As PowerPoint.Shape
Set pptApp = New PowerPoint.Application
pptApp.Visible = msoTrue
Set pptPres = pptApp.presentations.Open("workingPath")
ActiveWorkbook.Names("A").RefersToRange.Select
Selection.Copy
Set pptShape = pptPr
Excel-VBA Named range row sum
Programming Languages

I have the following code


For i = 1 To DepRng.Rows.Count
For j = 1 To DepRng.Columns.Count
DepRng.Cells(i, j) = Application.Sum(KidsRng.Row(i)) //Does not work
Next j
Next i

Although I know is wrong, i have no idea how to get it to store in DepRng.Cells(i, j) the total sum of the whole KidsRng.Row[i] Any help?


Export to named range in excel with named ranges within the data
Programming Languages
Hiya,
I'm having a bit of fun getting my exports to work!!
I'm exporting a few queries to populate up a nice pretty excel report.
From the excel perspective, there's the 'Data' range, a couple of 'Lookup' tables & the control date (month the report is for)
I've got the Data section working fine -exporting to the named range set up in excel, right place etc etc, but I'm having problems with the Lookups sections.
Each time I export them, they set up a new tab with the named range as the tab name (followed by 1, 2 etc -depending on how many times i've tried...) & reset the named range to the output on these new tabs.
Copy Named Range in Excel VBA
Programming Languages

How can i copy data from a named range in a different worksheet and paste it to another worksheet all done without activating both sheet. With all code just behind a form button

If i try to use the statement application.goto reference:="x" where x is the named range but this activates the sheets
if i try to use the statement range("workbookname!x") where x is the named range, i get an exception

Anyone please?


VBA Excel Mutiple Workbook with named range copy and paste to new Workbook
Programming Languages

I have 30 over sheets of different workbooks with the same named ranged in each worksheet. I need to consolidate all worksheet information into one.

I have named the cells as Group1,Group2,Group3,Group4,Group5.

And so, all the workbook with named ranged Group1 will be copy and paste into master.xlsx of sheet1 and Group2 will be copied to sheet2 and thereafter.

I was wondering if this is possible? I have been hitting nails and couldn't find an answer in the web.



Privacy Policy - Copyrights Notice - Feedback - Report Violation - RSS 2017 © bighow.org All Rights Reserved .