Hi
I am trying to create a vba to open a spreadsheet and go to a specific worksheet within that spreadsheet.
The name of the spreadsheet is stored in cell A2 and the name of the worksheet is stored in cell B2.
Please help. Thanks
Hi
I am trying to create a vba to open a spreadsheet and go to a specific worksheet within that spreadsheet.
The name of the spreadsheet is stored in cell A2 and the name of the worksheet is stored in cell B2.
Please help. Thanks
Something like...
Please Login or Register to view this content.
Thanks. Just to clarify further :
Cell A2 : Full path and name of spreadsheet
Cell B2 : Name of worksheet in file referenced in Cell A2
I need to have the macro to open file referenced in cell A2 and go to worksheet referenced in cell B2
So far I have come up with
Sub OpenFile()
Dim wrkMyWorkBook As Workbook
Set wrkMyWorkBook = Workbooks.Open(Filename:=Sheets("Sheet1").Range("A2").Value, Password:="xxx")
End Sub
I now need to determine how to go to a specific worksheet in the above spreadsheet. (The workbook is locked).
Last edited by gato88; 02-11-2014 at 01:40 AM.
Please Login or Register to view this content.
Perfect! Thanks cplettner
I also added this extra bit to unprotect the worksheet
.Sheets(MySheet).Unprotect
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks