still learning
Well-known Member
- Joined
- Jan 15, 2010
- Messages
- 785
- Office Version
- 365
- Platform
- Windows
Hi
I have a macro that adds a blank line to a row of dates. (to separate each row)
When it gets to the end, I get an error message.
I tried to add an ERROR LINE, but I’m doing something wrong
When it gets to the last line it gives me an error message I thing since >>End(xlDown) takes it to the bottom of the sheet .
I am using a looping macro to start it
mike
I have a macro that adds a blank line to a row of dates. (to separate each row)
When it gets to the end, I get an error message.
I tried to add an ERROR LINE, but I’m doing something wrong
When it gets to the last line it gives me an error message I thing since >>End(xlDown) takes it to the bottom of the sheet .
I am using a looping macro to start it
VBA Code:
Sub newmultiplefills()
Dim I
For I = 1 To Range("dates")
Macro3
Next I
errorline: Exit Sub
End Sub
VBA Code:
Sub Macro3()
On Error GoTo errorline
ActiveCell.Range("A1:B1").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Cut
ActiveCell.Offset(1, 0).Range("A1").Select
ActiveSheet.Paste
ActiveCell.Offset(1, 0).Range("A1").Select
errorline: Exit Sub
End Sub
mike