tiredofit
Well-known Member
- Joined
- Apr 11, 2013
- Messages
- 1,924
- Office Version
- 365
- 2019
- Platform
- Windows
Using this, I can choose a file to open:
However, what happens if the chosen file contains more than a single worksheet?
How can I specify the specific worksheet?
Thanks
Code:
Dim Selector As FileDialog
Set Selector = Application.FileDialog(msoFileialogOpen)
Selector.Show
Dim Selected As Boolean
If Selected Then Selector.Execute
Dim wb As Workbook
Set wb = ActiveWorkbook
Dim MyVal
MyVal = wb.Worksheets(1).Cells(1,1).Value
However, what happens if the chosen file contains more than a single worksheet?
How can I specify the specific worksheet?
Thanks