Hyperlink

T

Tamm

I have a hyperlink in another document that opens an excel
workbook. How do I make the link open a certian
spreadsheet in the workbook ??

Thanks
 
G

Gord Dibben

Tamm

You can use VBA Workbook_Open code to go to the specific sheet.

With the target workbook open.......

Right-click on the Excel Icon at top-left corner of Menu Bar. Select "View
Code. Paste this code in there. Save the file.

Sub WorkBook_Open()
WorkSheets("Sheet2").Activate
End Sub

The "Sheet2" is example only. Your sheetname may differ. Adjust as needed.

OR use Workbook_BeforeClose code to set the worksheet as the active sheet upon
closing the workbooK.

Note: with either of the above methods the code goes into the ThisWorkbook
module, not a general or worksheet module.

Gord Dibben Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top