unknownymous
Board Regular
- Joined
- Sep 19, 2017
- Messages
- 249
- Office Version
- 2016
- Platform
- Windows
Hi Guys,
Here's a snap of my codes but it automatically paste the CSV file data on the data sheet. I was wondering if you could help me find the codes for GetOpenFile whereas the path file directory will open. After I paste the address, the macro will open the CSV file and paste everything on the Data Sheet.xlsx then CSV file will close.
Sub Subject()
Dim strFile As String
Dim strCSV As String
strFile = ActiveWorkbook.Path
strCSV = "Subject.csv"
Workbooks.Open strFile & "" & strCSV
Range("A1").CurrentRegion.Copy Destination:=Workbooks("Data Sheet.xlsx").Sheets("Data Sheet").Range("A1")
Workbooks(strCSV).Close
Any help will be much appreciated.
Thank you!
Here's a snap of my codes but it automatically paste the CSV file data on the data sheet. I was wondering if you could help me find the codes for GetOpenFile whereas the path file directory will open. After I paste the address, the macro will open the CSV file and paste everything on the Data Sheet.xlsx then CSV file will close.
Sub Subject()
Dim strFile As String
Dim strCSV As String
strFile = ActiveWorkbook.Path
strCSV = "Subject.csv"
Workbooks.Open strFile & "" & strCSV
Range("A1").CurrentRegion.Copy Destination:=Workbooks("Data Sheet.xlsx").Sheets("Data Sheet").Range("A1")
Workbooks(strCSV).Close
Any help will be much appreciated.
Thank you!