Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
use of variable in formula / execute4excel
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 |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
use of variable in formula / execute4excel
Cheers Chip - tried that but it still hangs in the debugger with a
runtime error 1004.... |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Using a variable in a VBA formula | Excel Discussion (Misc queries) | |||
use a variable array in a formula | Excel Discussion (Misc queries) | |||
Refrencing a variable cell in a formula | Excel Discussion (Misc queries) | |||
Variable Sheet Name in Formula | Excel Discussion (Misc queries) | |||
Formula checking multiple worksheets | Excel Worksheet Functions |