I have three single sheet workbooks which I wish to copy into three worksheets in one workbook. After copying I change column headings, remove a few unwanted rows before importing the sheets into Access tables.
My VBA is executed for a button in sheet 1 of the receiving workbook.
I have three instances of the following, each using a different source workbook.
ActiveWorkbook.Sheets(1).UsedRange.Copy ThisWorkbook.Sheets(2).Range("A1")
ActiveWorkbook.Sheets(1).UsedRange.Copy ThisWorkbook.Sheets(3).Range("A1")
ActiveWorkbook.Sheets(1).UsedRange.Copy ThisWorkbook.Sheets(4).Range("A1")
One worksheet contains the same number of columns as the source workbook, the other two have many more empty columns added, which then get imported into Access as unwanted fields.
I don't understand why.
Can anyone help?
My VBA is executed for a button in sheet 1 of the receiving workbook.
I have three instances of the following, each using a different source workbook.
ActiveWorkbook.Sheets(1).UsedRange.Copy ThisWorkbook.Sheets(2).Range("A1")
ActiveWorkbook.Sheets(1).UsedRange.Copy ThisWorkbook.Sheets(3).Range("A1")
ActiveWorkbook.Sheets(1).UsedRange.Copy ThisWorkbook.Sheets(4).Range("A1")
One worksheet contains the same number of columns as the source workbook, the other two have many more empty columns added, which then get imported into Access as unwanted fields.
I don't understand why.
Can anyone help?