Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Setting variable names in code
Hi
I would use an array variable for this. have a look for array variables in the vBA help e.g. dim xp(10) xp(1)="hello" xp(2)="world" msgbox xp(1) & " " & xp(2) -- Regards Frank Kabel Frankfurt, Germany Newbie wrote: Hi, I would like to know how to set a variable name in code. I need a number of variable, eg xp01, xp03, xp06 etc where the last two digits are dependent on cell values. At the moment I am typing them into the code manually i.e. xp01 = "whatever": xp03 = 4 etc and listing all the xp**. So if someone could tell me how to build the variable name within VBA, I could then loop the the sheet to set the variable values. TIA |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
using the Excel generic worksheet names instead of user-given names in code | Excel Discussion (Misc queries) | |||
Setting the cell number as a variable | Excel Discussion (Misc queries) | |||
can i link a variable cost code with a variable sum | Excel Discussion (Misc queries) | |||
Setting up variable summary sheet. | Excel Discussion (Misc queries) | |||
Setting up a variable print range | Excel Programming |