View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Chip Pearson
 
Posts: n/a
Default use of variable in formula / execute4excel

Change
ExecuteExcel4Macro " formulaString "
to
ExecuteExcel4Macro formulaString


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



wrote in message
ups.com...
Hi,

I am trying to do an execute4excel which should read as
follows:

execute4excel "formula(""=R5C3"")"

the problem is is that the "5" in the R5C3 bit is going to
change, as
it is a variable. I've set up the following string to contain
the whole
formula:

****
' set up the formula string
Dim formulaString As String
formulaString = "formula(""""=R"
formulaString = formulaString & rowNumber
formulaString = formulaString & "c3"""")"
****

and now want to do something along the lines of:

ExecuteExcel4Macro " formulaString "
, but this hangs...


In terms of the big picture, I'm trying to make a shape on a
worksheet,
and insert into it the text contained in the row 5 column 3;
then
create another shape with the text from row 6 column 3 etc...
and this
appears to be a way of doing it... if there's a better one I'd
love to
hear about it!

Any help would be very greatfully received :D

Cheers

Chris