Hello everyone.
I am trying a little program to see if I could select full rows for copying.
the code i use is as follows
Sub exercise
Range ("3:3, 5:5, 8:8").select
End Sub
that works perfectly as it hightlight rows 3, 5, and 8 but I want to be able to select rows 12, 24, 36, 48, 60, etc....
So I thought I could use a code something like...
Sub Exercise
dim sheetloop as integer
for sheetloop = 0 to 100
sheetloop = sheetloop + 12
Range ("sheetloop:sheetloop").select
sheetloop = sheetloop - 1
next sheetloop
End Sub
Please forgive the VB grammar. I know it may be completely wrong as I am a newbie at VB, but I hope that you get the gist of what I want to do.
The error I get is 'Run-time error '1004': method 'Range' of object'_Global' failed.
I believe variables cannot be used in 'Range' functions. Or maybe?????
Also, another option is that I could have an INPUT saying 'What increment do you want to choose rows??'
If the user enters '10', then the rows 10, 20, 30, 40, etc are selected.
Is this also possible??
Thank you very much for looking.
Bookmarks