PC Review


Reply
Thread Tools Rate Thread

disabling tool bar

 
 
=?Utf-8?B?TmF0aGFuRw==?=
Guest
Posts: n/a
 
      14th Feb 2007
Hi,

As part of a system a new tool bar was created in excel to allow the user to
use the system. The process which takes place is that a user creates a new
spreadsheet from access based on the criteria selected. The tool bar appears
automatically. The problem is that when a new workbook is opened totally
unrelated to the system the tool bar still appears. I have played around with
VBA code a little to see if I could add a line that only adds the tool bar
for the active spreadsheet for not excel as a whole.

I have used onopen and onclose (or macros to that effect) before that remove
toolbars and when the user closes the spreadsheet all the tool bars etc are
added back in as normal. I don't recall the macros being shared with all
excel spreadsheets subsequently opened.

How can I ensure the custom tool bar only appears on the spreadsheets I want
it to?

Many thanks

Nathan
 
Reply With Quote
 
 
 
 
Tom Ogilvy
Guest
Posts: n/a
 
      14th Feb 2007
Create it when the workbook is opened. Delete it when the workbook is
closed.

--
Regards,
Tom Ogilvy


"NathanG" <(E-Mail Removed)> wrote in message
news:3B609F55-4BD8-4293-94A5-(E-Mail Removed)...
> Hi,
>
> As part of a system a new tool bar was created in excel to allow the user
> to
> use the system. The process which takes place is that a user creates a new
> spreadsheet from access based on the criteria selected. The tool bar
> appears
> automatically. The problem is that when a new workbook is opened totally
> unrelated to the system the tool bar still appears. I have played around
> with
> VBA code a little to see if I could add a line that only adds the tool bar
> for the active spreadsheet for not excel as a whole.
>
> I have used onopen and onclose (or macros to that effect) before that
> remove
> toolbars and when the user closes the spreadsheet all the tool bars etc
> are
> added back in as normal. I don't recall the macros being shared with all
> excel spreadsheets subsequently opened.
>
> How can I ensure the custom tool bar only appears on the spreadsheets I
> want
> it to?
>
> Many thanks
>
> Nathan



 
Reply With Quote
 
=?Utf-8?B?Sm9lbA==?=
Guest
Posts: n/a
 
      14th Feb 2007
I good tip for new excel programmers is to record new macro and then see what
code is generated by excel. I tried this with the tool bar and got the
following line of code

Application.CommandBars("Chart").Visible = True

where chart is one of the standard tool bars.

You can add this code into a macro that automatically starts
by calling the macro

Sub auto_open()


"NathanG" wrote:

> Hi,
>
> As part of a system a new tool bar was created in excel to allow the user to
> use the system. The process which takes place is that a user creates a new
> spreadsheet from access based on the criteria selected. The tool bar appears
> automatically. The problem is that when a new workbook is opened totally
> unrelated to the system the tool bar still appears. I have played around with
> VBA code a little to see if I could add a line that only adds the tool bar
> for the active spreadsheet for not excel as a whole.
>
> I have used onopen and onclose (or macros to that effect) before that remove
> toolbars and when the user closes the spreadsheet all the tool bars etc are
> added back in as normal. I don't recall the macros being shared with all
> excel spreadsheets subsequently opened.
>
> How can I ensure the custom tool bar only appears on the spreadsheets I want
> it to?
>
> Many thanks
>
> Nathan

 
Reply With Quote
 
Ron de Bruin
Guest
Posts: n/a
 
      14th Feb 2007
Hi NathanG

See Dave's tip on Debra's site
http://www.contextures.com/xlToolbar02.html

You can also use this two events in the thisworkbook module if you only want to see the
toolbar when the workbook is active

Private Sub Workbook_Activate()
'name of your macro
End Sub

Private Sub Workbook_Deactivate()
'name of your macro
End Sub



--

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


"NathanG" <(E-Mail Removed)> wrote in message news:3B609F55-4BD8-4293-94A5-(E-Mail Removed)...
> Hi,
>
> As part of a system a new tool bar was created in excel to allow the user to
> use the system. The process which takes place is that a user creates a new
> spreadsheet from access based on the criteria selected. The tool bar appears
> automatically. The problem is that when a new workbook is opened totally
> unrelated to the system the tool bar still appears. I have played around with
> VBA code a little to see if I could add a line that only adds the tool bar
> for the active spreadsheet for not excel as a whole.
>
> I have used onopen and onclose (or macros to that effect) before that remove
> toolbars and when the user closes the spreadsheet all the tool bars etc are
> added back in as normal. I don't recall the macros being shared with all
> excel spreadsheets subsequently opened.
>
> How can I ensure the custom tool bar only appears on the spreadsheets I want
> it to?
>
> Many thanks
>
> Nathan

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Disabling or uninstalling Windows Easy Transfer tool =?Utf-8?B?TmljaG9sYXNU?= Windows Vista Installation 0 23rd May 2007 05:09 AM
Some good user migration tool/software tool recommend? (W2K -> WXP) Zorpetus Microsoft Windows 2000 0 9th Jan 2007 02:37 PM
Disabling tool bars =?Utf-8?B?TWlrZSBSb2dlcnM=?= Microsoft Excel Misc 1 6th Dec 2005 05:11 PM
Simple Photo + Image Annotation and Markup Tool or Method in (an existing tool) leejackp@gmail.com Freeware 2 1st Aug 2005 01:47 PM
Disabling tool tray pop-up notices Sean Windows XP General 1 28th Nov 2003 11:21 PM


Features
 

Advertising
 

Newsgroups
 


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