geno32080
Board Regular
- Joined
- Jan 23, 2020
- Messages
- 112
- Office Version
- 2013
- Platform
- Windows
I can get it to open the sheet, but then
It halts at the sourceworkbook.Sheets("Jax").Copy ("A3:S81")
I need it copy jax sheet cells A3:S81, close it and paste to Sheet2 cells B9:S81
Any suggestions?
Private Sub CommandButton1_Click()
Dim sourceworkbook As Workbook
Dim currentworkbook As Workbook
Set currentworkbook = ThisWorkbook
Set sourcework = Workbooks.Open("D:\folder\import\Jax.csv")
sourceworkbook.Sheets("Jax").Copy ("A3:S81")
sourceworkbook.Close
Set sourceworkbook = Nothing
Set currentworkbook = Nothing
ThisWorkbook.Activate
Worksheets("Sheet2").Activate
Worksheets("Sheet2").Range("B9:S81").Select
End Sub
It halts at the sourceworkbook.Sheets("Jax").Copy ("A3:S81")
I need it copy jax sheet cells A3:S81, close it and paste to Sheet2 cells B9:S81
Any suggestions?
Private Sub CommandButton1_Click()
Dim sourceworkbook As Workbook
Dim currentworkbook As Workbook
Set currentworkbook = ThisWorkbook
Set sourcework = Workbooks.Open("D:\folder\import\Jax.csv")
sourceworkbook.Sheets("Jax").Copy ("A3:S81")
sourceworkbook.Close
Set sourceworkbook = Nothing
Set currentworkbook = Nothing
ThisWorkbook.Activate
Worksheets("Sheet2").Activate
Worksheets("Sheet2").Range("B9:S81").Select
End Sub