TAPS_MikeDion
Well-known Member
- Joined
- Aug 14, 2009
- Messages
- 622
- Office Version
- 2011
- Platform
- MacOS
Hi people,
I'm going nuts trying to figure out why this code is deleting the entire row instead of just the selected range. I even recorded a macro to see if I was doing something wrong and the macro that was recorded was basically identical to what I have, and it still deletes the whole row.
For this example assume the following variables:
wSheet = "ZIP Codes"
ZIP = "G"
City = "H"
dRange = 6
Thanks in advance.
I'm going nuts trying to figure out why this code is deleting the entire row instead of just the selected range. I even recorded a macro to see if I was doing something wrong and the macro that was recorded was basically identical to what I have, and it still deletes the whole row.
For this example assume the following variables:
wSheet = "ZIP Codes"
ZIP = "G"
City = "H"
dRange = 6
Code:
Sheets(wSheet).Range(ZIP & dRange & ":" & City & dRange).Delete Shift:=xlUp
Thanks in advance.