HelpTheNewbie
New member
- Local time
- Today, 01:39
- Joined
- Feb 26, 2007
- Messages
- 7
I set up some code that allows a user to import an Excel file; however one format that will be imported has a variable worksheet name... This is what I have so far, but it depends on the user setting the sheet name to "Sheet1" prior to import...
Set appExcel = GetObject(ImportFile)
appExcel.Application.Visible = False
appExcel.Parent.Windows(1).Visible = True
Set workSheet = appExcel.Worksheets("Sheet1")
Can I change this code to set the worksheet as the only work sheet in the Excel file, or do I need to rename the sheet every time I want to import it into Access?
Set appExcel = GetObject(ImportFile)
appExcel.Application.Visible = False
appExcel.Parent.Windows(1).Visible = True
Set workSheet = appExcel.Worksheets("Sheet1")
Can I change this code to set the worksheet as the only work sheet in the Excel file, or do I need to rename the sheet every time I want to import it into Access?