I am trying to open a spreadsheet and read from that sheet except I am encountering a "subscript out of range" error on the
portion of what you see below. I figure that is because I am trying to reference the full path and not the file name, so how do I get the file name exculding path? Or am I off base?
Code:
Set whatBook = Workbooks(myFile)
Code:
myFile = Application.GetOpenFilename("Microsoft Excel Files (*.xls*), *.xls*")
Workbooks.Open (myFile)
skippedLines = False
'On Error GoTo skipIt
Set whatBook = Workbooks(myFile)
With whatBook.Sheets("Sheet1")...