ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   worksheet won't change visible status (https://www.excelbanter.com/excel-programming/297895-worksheet-wont-change-visible-status.html)

majikman[_9_]

worksheet won't change visible status
 
Private Sub viewNNI()
With Application.CommandBars.ActionControl
If ActiveWorkbook.Charts("NNI SALES$").Visible = xlSheetVisibl
Then
'.State = msoButtonUp
ActiveWorkbook.Charts("NNI SALES$").Visible
xlSheetVeryHidden
ActiveWorkbook.Charts("NNI MARGIN $").Visible
xlSheetVeryHidden
ActiveWorkbook.Charts("NNI Cumm Sales $").Visible
xlSheetVeryHidden
ActiveWorkbook.Worksheets("Sales $$").Visible
xlSheetVeryHidden
Else
'.State = msoButtonDown
ActiveWorkbook.Charts("NNI SALES$").Visible
xlSheetVisible
ActiveWorkbook.Charts("NNI MARGIN $").Visible
xlSheetVisible
ActiveWorkbook.Charts("NNI Cumm Sales $").Visible
xlSheetVisible
ActiveWorkbook.Worksheets("Sales $$").Visible
xlSheetVeryHidden
End If
End With
End Sub

i can't get my worksheet name Sales $$ to change its Visible status
The worksheet name is correct. All the charts work. I don't understan
why this isn't working. Can someone please point out what I'm doin
wrong

--
Message posted from http://www.ExcelForum.com



All times are GMT +1. The time now is 03:39 AM.

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