LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ray Ray is offline
external usenet poster
 
Posts: 267
Default ? for Ron de Bruin -- NavToolBar

Hi Ron -

I've got an add-in (built for XL2003) that has been extremely useful
to me and now that my company has migrated to XL2007, I find that I
really miss it .... this code was originally built by Dave Peterson,
but he referred me to you (due to your XL2007 knowledge). I hope you
can help ...

The code basically builds a small drop-down 'menu' by which I'm able
to easily navigate through all of the sheets in the active workbook
(using 'refresh' to update for a new book). I should note that the
code DOES WORK in XL2007 ... however, instead of using a drop-down
that's anchored to the bottom of my window, I have to click on Add-Ins
(in the Ribbon) first. It's just one extra step, but over the past 2
weeks, I've found it to be tiresome.

So, here's my question - can this code be modified to do the same
thing (anchored to bottom of window) in XL2007 and if so, how? I know
I can use the UI Editor to change the Ribbon itself, but I don't have
time to figure this part out.

Thanks in Advance,
Ray


Here's the code:
Sub Auto_Open()
'code written by Dave Peterson 2005-12-21
'creates a toolbar with list of sheets in active workbook

Dim cb As CommandBar
Dim ctrl As CommandBarControl

On Error Resume Next
Application.CommandBars("MyNavigator").Delete
On Error GoTo 0

Set cb = Application.CommandBars.Add(Name:="myNavigator",
Position:=msoBarBottom, temporary:=True)
With cb
.Visible = True
Set ctrl = .Controls.Add(Type:=msoControlButton,
temporary:=True)
With ctrl
.Style = msoButtonCaption
.Caption = "Refresh Worksheet List"
.OnAction = ThisWorkbook.Name & "!refreshthesheets"
End With

Set ctrl = .Controls.Add(Type:=msoControlComboBox,
temporary:=True)
With ctrl
.Width = 300
.AddItem "Click Refresh First"
.OnAction = ThisWorkbook.Name & "!changethesheet"
.Tag = "__wksnames__"
End With
End With

End Sub
 
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
to Ron de Bruin Please Steved Excel Programming 5 March 13th 08 12:30 AM
Ron de Bruin General[_2_] Excel Programming 1 October 22nd 07 06:26 PM
RON DE BRUIN: Help with CDO Please Newbike Excel Programming 1 September 11th 07 05:52 PM
NavToolbar ? for Dave Peterson Ray Excel Discussion (Misc queries) 7 August 16th 07 03:45 PM
Q4 Ron de Bruin Newbie Excel Programming 4 August 7th 06 09:26 AM


All times are GMT +1. The time now is 02:50 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"