View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
halibut halibut is offline
external usenet poster
 
Posts: 7
Default Private Sub Workbook_Open() & Workbook_BeforeClose(cancel As Boolean)

Private Sub Workbook_BeforeClose(cancel As Boolean)
Application.CommandBars("Pack tool bar").Visible = False
End Sub

Private Sub Workbook_Open()
Sheet1.Range("e3").Value = Sheet1.Range("ap3").Value
Application.CommandBars("Pack tool bar").Visible = True
Application.CommandBars("Pack tool
bar").Controls("Import").OnAction = "Import"
Application.CommandBars("Pack tool bar").Controls("Print
Pack").OnAction = "Printmacro"
Application.CommandBars("Pack tool bar").Controls("Roll
TB").OnAction = "Periodchange"
Application.CommandBars("Pack tool bar").Controls("Reset
Pack").OnAction = "Reset"
End Sub

These two routines do not work (they work on other installations of
excel on other computers) when the workbook is opened. In fact any code
I try and run from the Workbook_Open() & Workbook_BeforeClose(cancel As
Boolean) does not work on my installation of Excel 2003 it only works
if i run it manually.

Does any one have any ideas why? Are there any settings I have
inadvertently changed?