Good afternoon. This is in Excel 2010. I am trying to create 90+ named ranges in a workbook that correspond to a list of named text boxes in PowerPoint. (I will then populate each cell with the value from its corresponding text box). I thought I'd split the lines so I could see the names without scrolling across but I got to the stage where I got the message
Here is an example of what I was doing to name the ranges:-
Then from PowerPoint I run this to populate the ranges with values:-
So, my basic question is, "What's the "best" way of naming a large number of ranges from any particular list?
Any other incidental, "You dork!! Why don't you do this instead??" Would be gratefully received. (I know that forum users aren't backward in coming forward with suggestions )
On reflection, I suppose I could do it all from within Powerpoint; that would be a bit tidier.
Many thanks,
D€$
Code:
Too many line continuations
Here is an example of what I was doing to name the ranges:-
Code:
'This is from PowerPoint Slide 12
BNames = Array("AnyTotalBrandRecall", "AnyLikeability", "AnyTalkability" _
, "AnyTouchScreen", "AnyBetterOpinion", "AnyEncourages")
For a = 0 To UBound(BNames)
ActiveWorkbook.Names.Add Name:=BNames(a), RefersToR1C1:=Cells(a + 2, 3) 'Row 2 Column 3, (C2)
Next a
Then from PowerPoint I run this to populate the ranges with values:-
Code:
RNames = Array("AnyTotalBrandRecall", "AnyLikeability", "AnyTalkability" _
, "AnyTouchScreen", "AnyBetterOpinion", "AnyEncourages")
With ActivePresentation.Slides.Range("Slide 12")
For Each RName In RNames
Set MyText = .Shapes("Textbox " & RName)
LenText = Len(MyText.TextFrame.TextRange) 'Length of text
ScoreNumber = Left((MyText.TextFrame.TextRange), LenText - 1) 'Removes the "%"
XLApp.Range(RName) = ScoreNumber
Next RName
End With
' Clean up
Set XLApp = Nothing
So, my basic question is, "What's the "best" way of naming a large number of ranges from any particular list?
Any other incidental, "You dork!! Why don't you do this instead??" Would be gratefully received. (I know that forum users aren't backward in coming forward with suggestions )
On reflection, I suppose I could do it all from within Powerpoint; that would be a bit tidier.
Many thanks,
D€$