Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default quick access tool bar show/hide custom button on open/close workbo

I have a workbook with code that displays a user form when the workbook is
opened. I've also added (using the "Customize" option in "Excel Option's") a
custom button to the Quick Access Toolbar that displays the same user form
when clicked. How can I get the button to show on the quick access toolbar
for this workbook only? Or, am I going about accomplishing these two things
in the completely wrong way?

The relevant VBA statements are simple:

Sub Workbook_open()
UserForm1.show
End Sub

and the macro behind the button on the quick access toolbar is

Sub OpenFormFromToolbar()
UserFrom1.show
End Sub

All help will be greatly appreciated.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 238
Default quick access tool bar show/hide custom button on open/closeworkbo

I use this in the sheet code to call macros that open and close
toolbars.

Private Sub Worksheet_Deactivate()
Call NoBar16
End Sub

Private Sub Worksheet_Activate()
Call Bar16
End Sub

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default quick access tool bar show/hide custom button on open/close wo

Thanks Fan924

I have a 3-sheet workbook so I could try using such a code on each sheet.
But if I don't remove it via code from the quick access toolbar won't it
still be available on all workbooks?

"Fan924" wrote:

I use this in the sheet code to call macros that open and close
toolbars.

Private Sub Worksheet_Deactivate()
Call NoBar16
End Sub

Private Sub Worksheet_Activate()
Call Bar16
End Sub


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default quick access tool bar show/hide custom button on open/close workbo

Hi JCIrish

Right click on the QAT and choose Customize QAT
In the "Choose Commands from" dropdown choose "Macros"
In the "Customize Quick Access Toolbar" dropdown choose "For workbook name"
Add the "macro" to the QAT
If you want you can use the Modify button to choose another icon
Press OK


There is a bug on this moment so read this
http://www.rondebruin.nl/qatbuttonbug.htm



--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm




"JCIrish" wrote in message ...
I have a workbook with code that displays a user form when the workbook is
opened. I've also added (using the "Customize" option in "Excel Option's") a
custom button to the Quick Access Toolbar that displays the same user form
when clicked. How can I get the button to show on the quick access toolbar
for this workbook only? Or, am I going about accomplishing these two things
in the completely wrong way?

The relevant VBA statements are simple:

Sub Workbook_open()
UserForm1.show
End Sub

and the macro behind the button on the quick access toolbar is

Sub OpenFormFromToolbar()
UserFrom1.show
End Sub

All help will be greatly appreciated.

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
Easy way to add my custom button on Excel 2010 quick access toolbar? Chet Excel Discussion (Misc queries) 0 April 5th 10 10:21 PM
Quick Access Tool Bar won't save customization Doug Excel Discussion (Misc queries) 12 September 3rd 09 08:15 PM
How do I copy quick access tool bar to another computer? JohnA[_2_] Excel Discussion (Misc queries) 1 December 14th 08 10:08 PM
Add Custom Button to Quick Access Toolbar Randy[_2_] Excel Programming 4 September 12th 07 06:55 PM
add text to the icons in the quick access tool bar Julian Brotherton Setting up and Configuration of Excel 0 June 10th 07 08:43 AM


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