Eurekaonide
Active Member
- Joined
- Feb 1, 2010
- Messages
- 422
Hi All
can you tell me where I am going wrong here please.
I am trying to open another workbook select the data in the only worksheet it will have between Columns A:BG and as far down as the data goes in column A and copy it into the workbook I am running the code from into the worksheet "Changes".
I cant use the worksheet or workbook name that I'm opening as it could be called something new each time, however the columns are always the same the rows will differ.
Its opening but its not selecting and copying the data across into this workbook sheet "changes". Please can you help.
can you tell me where I am going wrong here please.
I am trying to open another workbook select the data in the only worksheet it will have between Columns A:BG and as far down as the data goes in column A and copy it into the workbook I am running the code from into the worksheet "Changes".
I cant use the worksheet or workbook name that I'm opening as it could be called something new each time, however the columns are always the same the rows will differ.
Its opening but its not selecting and copying the data across into this workbook sheet "changes". Please can you help.
VBA Code:
Sub OpenFileDialogBox()
On Error Resume Next
Dim FilePath As String
FilePath = Application.GetOpenFilename()
Workbooks.Open (FilePath)
ActiveWorkbook.Worksheets.Select
Range("A:BG" & Rows.Count, "A").End(xlUp).Select
Selection.Copy
ThisWorkbook.Activate
Sheets("Changes").Select
Range("A1").PasteSpecial
End Sub