Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Golbal Variable Failed
Greetings,
I have a set of named ranges named rInput1 thru rInput31 (days of the month). I need to go to the top left cell inside these ranges and count down to the row of interest (shown as I_1.value). I was using this code to copy the contents of 105 TextBoxes to this row within the chosen named range. ---------------------------------------------------------------------------------------------- For i = 2 To 105 Range("rInput" & iTD).Cells(I_1.Value, 1).Offset(0, i).Value _ = Me.Controls("I_" & i).Value Next i ---------------------------------------------------------------------------------------------- iTD is the day and Range("rInput" & iTD) is supposed to be the named range for that day. Debug shows the value of iTD to be correct but when I combine it with the rest of the name for that named range, I keep getting this error message: ---------------------------------------------------------------------------------------------- Run-time error '1004': Method 'Range' of object '_Global' failed. ---------------------------------------------------------------------------------------------- iTD is assigned in the UserForm_Initialize procedure. This is the code debug high lighted: Range("rInput" & iTD).Cells(I_1.Value, 1).Offset(0, i).Value _ = Me.Controls("I_" & i).Value Anyone see what is wrong with this code??? Any help is really appreciated. -Minitman |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Run-Time error '91': Object variable of With block variable not set | Excel Programming | |||
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 | |||
Run-time error '91': "Object variable or With block variable not set | Excel Programming | |||
Cells.Find error Object variable or With block variable not set | Excel Programming | |||
Excel VBA - Storing text in a variable, and "'Cells' of object _Global failed" | Excel Programming |