ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Hide tab sheet in webpage (Excel) (https://www.excelbanter.com/excel-worksheet-functions/60131-hide-tab-sheet-webpage-excel.html)

Tat Fatt

Hide tab sheet in webpage (Excel)
 
Hi,
I've hidden my sheet tabs via the tools - options - view, but when published
in web view or saved as web page they appear, how can I hide?

Thank you.



topola

Hide tab sheet in webpage (Excel)
 
Try the following procedures to manipulate with sheets Hidden/ Visible
properties.

Sub Hide_My_Worksheet()
Application.Worksheets("Sheet1").Visible = xlSheetHidden
End Sub

Sub UnHide_My_Worksheet()
Application.Worksheets("Sheet1").Visible = xlSheetVisible
End Sub

Instead of "Sheet1" you can indicate number of the sheet to be hidden.
--
topola, http://vba.blog.onet.pl


Tat Fatt

Hide tab sheet in webpage (Excel)
 
Hi, thanks for your help.
however, how do I do this? should I update in Excel of in the webpage?
and how do I proceed?

Thanks

"topola" wrote:

Try the following procedures to manipulate with sheets Hidden/ Visible
properties.

Sub Hide_My_Worksheet()
Application.Worksheets("Sheet1").Visible = xlSheetHidden
End Sub

Sub UnHide_My_Worksheet()
Application.Worksheets("Sheet1").Visible = xlSheetVisible
End Sub

Instead of "Sheet1" you can indicate number of the sheet to be hidden.
--
topola, http://vba.blog.onet.pl



topola

Hide tab sheet in webpage (Excel)
 
Open Visual Basic Editor from EXCEL:
Tools Macro Visual Basic Editor
alternatively
ALT + F11.

In VISUAL BASIC EDITOR:
With the proper VBAProject i.e. your workbook e.g. Book2:
Insert Module
In Module Copy and Paste the provided code for the two macro procedures
(beging with "Sub ...", ending "End Sub" each).

Back in Excel (you can use Alt + Tab) you should already have two
macros available.
Tool Macro Macros (Alt + F8). Here you can RUN them.

When you hide proper sheets (run macro Hide_My_Worksheet) try exporting
the workbook to the web again.

Report us where you are...
--
Topola, http://vba.blog.onet.pl


Tat Fatt

Hide tab sheet in webpage (Excel)
 
Hi,
thanks for your assistance, I can now hide the sheet2, however, I have
created an hyperlink to open the sheet2 but in the web page I cannot view
anything at all if it's hidded.

The results is same if I were to hide in excel and publish in web page.
is there anyway I could still hide the sheet2 in webpage but and to open
when I click on the hyperlink?
e.g.
sheet1 = hyperlink to open sheet2
sheet2 = (hidden in web page) but once click on sheet1, it's blank nothing
appear.

Appreciate your assistance.


"topola" wrote:

Open Visual Basic Editor from EXCEL:
Tools Macro Visual Basic Editor
alternatively
ALT + F11.

In VISUAL BASIC EDITOR:
With the proper VBAProject i.e. your workbook e.g. Book2:
Insert Module
In Module Copy and Paste the provided code for the two macro procedures
(beging with "Sub ...", ending "End Sub" each).

Back in Excel (you can use Alt + Tab) you should already have two
macros available.
Tool Macro Macros (Alt + F8). Here you can RUN them.

When you hide proper sheets (run macro Hide_My_Worksheet) try exporting
the workbook to the web again.

Report us where you are...
--
Topola, http://vba.blog.onet.pl



topola

Hide tab sheet in webpage (Excel)
 
Hi,
I don't have experience with exporting Excel to web. I expect however
that it should behave in a similiar way. Forgive me if I am wrong.

I would try using macro procedures instead of hyperlinks.
I assume we are hiding/unhiding sheet1.

This would select cell C3 in sheet1:
Sub MyCell1()
Hide_My_Worksheet
Cells(3,3).Select
End Sub

This would go to the range called MyRange:
Sub MyRange1()
Hide_My_Worksheet
Application.Goto Reference:="MyRange"
End Sub

To hide sheet1 when you leave it:
Right click on Sheet1 tab. Select ViewCode. In this module copy/paste
this command:

Private Sub Worksheet_Deactivate()
Hide_My_Worksheet
End Sub

Check how it works for you and let me know,
Regards,
Tomek


Tat Fatt

Hide tab sheet in webpage (Excel)
 
Tried, still cannot hide sheet 2 in the web page :(
thanks anyway.

"topola" wrote:

Hi,
I don't have experience with exporting Excel to web. I expect however
that it should behave in a similiar way. Forgive me if I am wrong.

I would try using macro procedures instead of hyperlinks.
I assume we are hiding/unhiding sheet1.

This would select cell C3 in sheet1:
Sub MyCell1()
Hide_My_Worksheet
Cells(3,3).Select
End Sub

This would go to the range called MyRange:
Sub MyRange1()
Hide_My_Worksheet
Application.Goto Reference:="MyRange"
End Sub

To hide sheet1 when you leave it:
Right click on Sheet1 tab. Select ViewCode. In this module copy/paste
this command:

Private Sub Worksheet_Deactivate()
Hide_My_Worksheet
End Sub

Check how it works for you and let me know,
Regards,
Tomek



Hansn

Hide tab sheet in webpage (Excel)
 
Hi there, I have the same problem now. Did you ever get the answer if so can
you let me know.
thank you

"Tat Fatt" wrote:

Hi,
I've hidden my sheet tabs via the tools - options - view, but when published
in web view or saved as web page they appear, how can I hide?

Thank you.




All times are GMT +1. The time now is 11:46 PM.

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