Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 204
Default Most Recent Custom View

When I add the 'Custom Views' drop-down to a toolbar, it displays the name
of the custom view most recently selected (through the menu)
So this information must be stored somewhere...

How can I access it in code?

I need to know the name of the custom view that has been selected by the
user?

I've been told it can't be done... but if the toolbar control can read it,
the informaion must be somewhere...

Any ideas?

Thanks

M

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Most Recent Custom View

Michelle,

I don't believe Excel strores the name of the last custom view that was used
so if a workbook contains multiple custom views then I think whoever told you
that you can't do this is correct.

I played with trying to trap the name using worksheet change event code but
changing the custom view doesn't appear to trigger an event.

You can get the names of the custom views

Dim cv As CustomView
For Each cv In ThisWorkbook.CustomViews
MsgBox cv.Name
Next

and you can set a custom view with code

ThisWorkbook.CustomViews("MyView").Show


--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"Michelle" wrote:

When I add the 'Custom Views' drop-down to a toolbar, it displays the name
of the custom view most recently selected (through the menu)
So this information must be stored somewhere...

How can I access it in code?

I need to know the name of the custom view that has been selected by the
user?

I've been told it can't be done... but if the toolbar control can read it,
the informaion must be somewhere...

Any ideas?

Thanks

M

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
View Custom View with Sheet Protection John H[_2_] New Users to Excel 1 February 16th 07 05:54 PM
Help with Custom View vitorjose Excel Worksheet Functions 2 November 8th 06 02:47 PM
How to view a custom view when the worksheet is protected? JulesJam Excel Worksheet Functions 0 March 6th 06 02:15 PM
Missing "Custom View" entry from View menu mycroft777 Excel Discussion (Misc queries) 1 February 3rd 06 05:33 PM
Custom View Bug? [email protected] Excel Discussion (Misc queries) 7 November 15th 05 07:45 PM


All times are GMT +1. The time now is 09:49 PM.

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"