C
Crownman
Hi
I am trying to use the macro recorder in Excel 2003 to create a macro
that will copy selected data from one spreadsheet into another
spreadsheet. The copy to spreadsheet is an Excel database and I need
the macro to find the first blank row in the database and then do the
copy. My code so far is as follows:
Sub Copy_Feed_data()
'
' ' Keyboard Shortcut: Ctrl+m
'
Sheets("FEED").Select
Range("A2:M3").Select
Selection.Copy
Windows("ASCI PRICE DATABASE.xls").Activate
ActiveWindow.WindowState = xlNormal
ActiveWindow.SmallScroll Down:=-12
Range("A6").Select
Selection.End(xlDown).Select
Range("A28").Select
ActiveSheet.Paste
ActiveWindow.WindowState = xlMinimized
End Sub
When I recorded the macro I used the end down keystrokes and then
keyed down one more row which was the first blank row when I recorded
the macro. The marco interprets ths as selecting row 28 instead of
the first blank row.
Can someone help me with the correct command to get to the first blank
row instead of the specific row that was done when the macro was
recorded?
Thanks for any advice.
Crownman
I am trying to use the macro recorder in Excel 2003 to create a macro
that will copy selected data from one spreadsheet into another
spreadsheet. The copy to spreadsheet is an Excel database and I need
the macro to find the first blank row in the database and then do the
copy. My code so far is as follows:
Sub Copy_Feed_data()
'
' ' Keyboard Shortcut: Ctrl+m
'
Sheets("FEED").Select
Range("A2:M3").Select
Selection.Copy
Windows("ASCI PRICE DATABASE.xls").Activate
ActiveWindow.WindowState = xlNormal
ActiveWindow.SmallScroll Down:=-12
Range("A6").Select
Selection.End(xlDown).Select
Range("A28").Select
ActiveSheet.Paste
ActiveWindow.WindowState = xlMinimized
End Sub
When I recorded the macro I used the end down keystrokes and then
keyed down one more row which was the first blank row when I recorded
the macro. The marco interprets ths as selecting row 28 instead of
the first blank row.
Can someone help me with the correct command to get to the first blank
row instead of the specific row that was done when the macro was
recorded?
Thanks for any advice.
Crownman