Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Jim: Thanks for the help: I changed the variable type to interger and the
new code with cells worked! Again Thanks! "Jim Thomlinson" wrote: Give this a try... Cells(IngRowsxy, columnxy).Select Range takes up to 2 arguments. Each argument is a cell or cell address. Your code supplies the references to a single cell. You want to use Cells for that... -- HTH... Jim Thomlinson "Mathew" wrote: Gary's Student: Tried this and it did not work. I also changed the variable names. Here is what I have: I have a variable named IngRowsxy which equals an integer between 13 and 31 depending on several other options selected. The macro is assigning the correct value to this variable. The other variable is columnxy which is either 4 or 5. This is also working correctly. I used the step-by-step execution of the macro to verify this. However, when I try to use the Range(columnxy, IngRowsxy).Select I get the error. I also tried this: Range(columnxy IngRowsxy).Select So with your code, below I tried: addrs = IngRowsxy & "," & columnxy Range(addrs).Select and when that failed I tried: addrs = IngRowsxy & columnxy Range(addrs).Select Neither of these worked! Any help would be appreciated. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel macro which prompts for input and moves to a cell - repeated | Excel Worksheet Functions | |||
naming range moves me to macro | Excel Programming | |||
Macro moves data and more!!! | Excel Programming | |||
Hyperlink-link so that when a cell moves the link also moves? | Excel Programming | |||
Macro That Moves Cursor Down | Excel Programming |