I am using Excel 2003 on Windows 7 Pro 64 bit
 
When I open a file I need to call up an associated Custom Toolbar.

I have written VBA modules to do this and they work OK.

However when I reduce the application to the TaskBar (pressing"_"),

then retrieve it by clicking it's Icon on the TaskBar, it opens OK, but 
without the toolbar.
The code below is in place:-
 
 
*Sub Auto_Open()*

*Application.ScreenUpdating = False*

*Application.EnableEvents = False*

*Application.CommandBars("MyToolbar").Visible = True*

*More code………*

 

*And under "This Workbook":-*

*Private Sub Workbook_Activate()*

*Application.ScreenUpdating = False*

*Application.CommandBars("MyToolbar").Visible = True*

*On Error GoTo Line1*

*Workbooks("Book1.xls").Close savechanges:=False*

*Line1:*

*End Sub*

 

*Private Sub Workbook_Deactivate()*

*Application.ScreenUpdating = False*

*On Error GoTo Line1*

*Application.WindowState = xlMinimised*

*Line1:*

*End Sub*

 

*Private Sub MyShutdown()*

*Application.ScreenUpdating = False*

*UserForm4.Show*

*End Sub*

 

*Private Sub Workbook_Open()*

*Application.CommandBars("MyToolbar").Visible = True*

*End Sub*

 

*Private Sub Workbook_SheetActivate(ByVal Sh As Object)*

*Application.CommandBars("MyToolbar").Visible = True*

*Call Load*

*End Sub*

 

*Private Sub Workbook_WindowActivate(ByVal Wn As Window)*

*Application.ScreenUpdating = False*

*Application.CommandBars("MyToolbar").Visible = True*

*LS = Worksheets("CBs").Range("MyLastSheet").Value*

*Application.Worksheets(LS).Select*

*Line1:*

*End Sub*

 

*Private Sub Workbook_WindowDeactivate(ByVal Wn As Window)*

*Application.CommandBars("MyToolbar").Visible = False*

*End Sub*

 
 
but none of this activates the toolbar.

Help please

donwb

-- 
Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s 
=TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ 
https://www.facebook.com/discussexcel

FORUM RULES

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.
2) Don't post a question in the thread of another member.
3) Don't post questions regarding breaking or bypassing any security measure.
4) Acknowledge the responses you receive, good or bad.
5) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not allowed.

NOTE  : Don't ever post confidential data in a workbook. Forum owners and 
members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups "MS 
EXCEL AND VBA MACROS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to excel-macros+unsubscr...@googlegroups.com.
To post to this group, send email to excel-macros@googlegroups.com.
Visit this group at http://groups.google.com/group/excel-macros.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to