Opening A Specific Excel Sheet

  • Thread starter Thread starter spatel
  • Start date Start date
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?
 
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
 
I don't speak HTML, but maybe:

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

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

Back
Top