Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Variable holding across multiple subs?
I currently have this line in the first of a series of subs.
Z = ActiveWorkbook.Name This line is used to store the name of the workbook from which the macro is executed -- something that is necessary, because later subs in the series pull data from the original workbook to a new one. However, in the later subs, where I am hoping the name would be recalled, my current code is failing. Range("AM64").Select ActiveCell.FormulaR1C1 = _ "=VLOOKUP(RC[-38],'[" & Z & "]Plan'!R2170C242:R2229C248,7,FALSE)" Is there something wrong with my syntax? Do I need to somehow declare the variable across all the subs? How does that work? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
holding the result constant | Excel Worksheet Functions | |||
holding a value after first calcuation | Excel Worksheet Functions | |||
why is it saying sheetcnt is "variable not defined" how to do a global variable to share over multiple functions in vba for excel? | Excel Worksheet Functions | |||
Cells not holding format | Excel Discussion (Misc queries) | |||
Copy into Row holding Button | Excel Programming |