madkinson
Board Regular
- Joined
- Dec 17, 2004
- Messages
- 113
- Office Version
- 365
- Platform
- Windows
I am trying to write some VBA that will reference two variables, however I get a run-time error when I debug.
Here is the code:
Rows("StartRow:EndRow-1").Select
where Dim StartRow As Integer
and Dim EndRow As Integer
For example, when I run my subroutine, it assigns a value of 2 to StartRow and 4 to EndRow. I can see this in my Locals window. What am I doing wrong?
p.s. I apologize for not posting the entire code, but the IT staff don't let me download any add-ons
Here is the code:
Rows("StartRow:EndRow-1").Select
where Dim StartRow As Integer
and Dim EndRow As Integer
For example, when I run my subroutine, it assigns a value of 2 to StartRow and 4 to EndRow. I can see this in my Locals window. What am I doing wrong?
p.s. I apologize for not posting the entire code, but the IT staff don't let me download any add-ons