Glasgowsmile
Active Member
- Joined
- Apr 14, 2018
- Messages
- 280
- Office Version
- 365
- Platform
- Windows
When running this macro to upload a file and pull in data everything works great during the debug until I F8 after the tmpVal code
Not sure exactly what the problem might be but it looks like something in the esName is causing a problem?
Currently this report is only pulling data for xlsx files but I need it to be able to pull xlsx or xls.
Not sure exactly what the problem might be but it looks like something in the esName is causing a problem?
Currently this report is only pulling data for xlsx files but I need it to be able to pull xlsx or xls.
Code:
'esName = Application.GetOpenFilename(FileFilter:="Excel Files (*.xlsx), *.xlsx; *.xls", Title:="Please select a file")
esName = Application.GetOpenFilename(FileFilter:="Excel Files (*.xlsx; *.xls), OpenFiles", Title:="Please select a file")
Code:
tmpStart = InStr(esName, ".xlsx") tmpVal = Mid(esName, 1, tmpStart - 1)
New_esName = tmpVal + "_data.xlsx"
Last edited: