Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Bart
 
Posts: n/a
Default 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   Report Post  
Andy Brown
 
Posts: n/a
Default

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
HOW TO COPY 480 ACTIVE E-MAIL ADDRESSES CLM "G" ON AN ACTIVE EXCE. ragman10 Excel Discussion (Misc queries) 1 December 13th 04 11:52 PM
Sum to active cell GregR Excel Discussion (Misc queries) 4 December 10th 04 10:01 PM
Identifying the Active Fill Color Steve Conary Excel Discussion (Misc queries) 3 December 9th 04 04:45 AM
can I query active directory with excel? jwolson Excel Discussion (Misc queries) 0 December 8th 04 03:53 PM
Highlight Active Cell Db1712 Excel Discussion (Misc queries) 1 November 26th 04 01:14 PM


All times are GMT +1. The time now is 08:53 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"