ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Opening A Specific Excel Sheet (https://www.excelbanter.com/excel-discussion-misc-queries/34732-opening-specific-excel-sheet.html)

[email protected]

Opening A Specific Excel Sheet
 
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?


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

wrote in message
ups.com...
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?




Dave Peterson

I don't speak HTML, but maybe:

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


wrote:

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?


--

Dave Peterson


All times are GMT +1. The time now is 12:59 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com