R
RD
I have the following macro which is supposed to add a new sheet, open up the
designated file, copy the first 3 lines, go back to the original spreadsheet
and paste the copied 3 lines.
However, it seems to be stopping at the Selection.Paste line because it
can't determine which spreadsheet to go to.
How do I fix this? At any time I run this I could be in a diffferent
spreadsheet creating jnls.
Thanks in advance
Rick
Sub newupload()
'
' newupload Macro
'
' Sheets("Sheet1").Select
Sheets.Add
Workbooks.Open Filename:="I:\Jnl upload.xls"
Rows("1:3").Select
Selection.Copy
ActiveSheet.Activate
Selection.Paste
Windows("Jnl upload.xls").Activate
ActiveWindow.Close
End Sub
designated file, copy the first 3 lines, go back to the original spreadsheet
and paste the copied 3 lines.
However, it seems to be stopping at the Selection.Paste line because it
can't determine which spreadsheet to go to.
How do I fix this? At any time I run this I could be in a diffferent
spreadsheet creating jnls.
Thanks in advance
Rick
Sub newupload()
'
' newupload Macro
'
' Sheets("Sheet1").Select
Sheets.Add
Workbooks.Open Filename:="I:\Jnl upload.xls"
Rows("1:3").Select
Selection.Copy
ActiveSheet.Activate
Selection.Paste
Windows("Jnl upload.xls").Activate
ActiveWindow.Close
End Sub