Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Detecting active customview
Hello
I have to create a piece of code wich makes a few buttons visible or in visible depending of te active customview that is selected on a sheet.It has to be something like this: Private Sub Worksheet_Activate() If (ACTIVECUSTOMVIEW = view1) then CommandButton1.Visible = False End If If (ACTIVECUSTOMVIEW = view2) then CommandButton1.Visible = True End If End Sub Thanks in advance... |
#2
|
|||
|
|||
I'm not a proper coder, maybe someone else will chip in. However, I couldn't
find anything on this, so if it *can't* be done, I'd suggest checking for a view *condition*. So if View1 involved column C being hidden, something like: If Sheets("Sheet1").Columns(3).Hidden = True Then MsgBox "You're in View1." 'do stuff Else MsgBox "You're in View2." 'do other stuff End If HTH, Andy "Bart" wrote in message ... Hello I have to create a piece of code wich makes a few buttons visible or in visible depending of te active customview that is selected on a sheet.It has to be something like this: Private Sub Worksheet_Activate() If (ACTIVECUSTOMVIEW = view1) then CommandButton1.Visible = False End If If (ACTIVECUSTOMVIEW = view2) then CommandButton1.Visible = True End If End Sub Thanks in advance... |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
HOW TO COPY 480 ACTIVE E-MAIL ADDRESSES CLM "G" ON AN ACTIVE EXCE. | Excel Discussion (Misc queries) | |||
Sum to active cell | Excel Discussion (Misc queries) | |||
Identifying the Active Fill Color | Excel Discussion (Misc queries) | |||
can I query active directory with excel? | Excel Discussion (Misc queries) | |||
Highlight Active Cell | Excel Discussion (Misc queries) |