PDA

View Full Version : Automatic Macro execution



amrane
02-03-2011, 12:27 AM
Dear Sirs,

I am confused, since the macro [Workbook_Open] at "thisworkbook" is not able to call the other macro [AddNewToolBar],:(

Option Explicit
Private Sub Workbook_Open()
AddNewToolBar
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
DeleteToolbar
End Sub


Plz help?
Amrane

mancubus
02-03-2011, 01:05 AM
hi.

the module and macro names are the same.

Private Sub Workbook_Open()
Macro_ToolBar
End Sub


change Sub Macro_ToolBar() in Module Macro_ToolBar to Sub AddNewToolBar()

and modify the workbook_open proc as follows:


Private Sub Workbook_Open()
AddNewToolBar
End Sub

amrane
02-06-2011, 07:35 AM
Dear Sir,:hi:

Thank you do much.

Amrane