Opening A Specific Excel Sheet

S

spatel

Hello all,


Is there anyway to code in HTML to open a specific sheet in excel?
Like is there some way that I can make a link for my webpage that when
clicked, will go to let say, sheet 2?
 
H

Henry

SPatel,

If you save your workbook with sheet2 as the active (showing) sheet then it
will always open with that sheet showing.

If the HTML page can save the workbook then you need to put this code in
This Workbook

Alt + F11, Double click ThisWorkbook in the project pane and paste this in.


Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
Sheets("sheet2").Select
End Sub


Henry
 
D

Dave Peterson

I don't speak HTML, but maybe:

<a href="file://c:/yourfolder/book1.xls#'sheet 1'!A1">click me</a>
 
Top