Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I tried to define an object representing a variable number
of rows that are to be cut and inserted into another sheet. I got a type mismatch error on the code below. In the module where this code is going to go, the variables fromrow and to row are available and 'working'. I am a novice at 'object definition'. Help will be appreciated. Dim insertrange As range Dim fromrow, torow As Integer fromrow = 21: torow = 40 Set insertrange = Rows("&fromrow:&torow") ' Rows("21:40").Select trying to 'replace' this line of code insertrange.Select 'with this line of code Selection.Cut Sheets("new").Select range("A41").Select Selection.Insert Shift:=xlDown -- Neal Z |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Not at all clear on use of variables and/or object variables | Excel Discussion (Misc queries) | |||
Multiple Variables in a Commission Structure...a tough one!!! | Excel Worksheet Functions | |||
Not getting the object structure of VBA Excel | Excel Programming | |||
Object variables | Excel Programming | |||
Problem Using an Object Variable in a Class Definition | Excel Programming |