Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dear Frank, I do not understand your reply. why you said duplicate?
can explain. thanks alot Dear All, why beforeclose i got this message at set cmd = commandbars("Tender Bar") run time error 91 object variable or with block variable not set? click commandbutton works fine. pls help. thanks Private Sub Workbook_BeforeClose(Cancel As Boolean) disable End Sub Sub disable() Dim cmd As CommandBar Set cmd = CommandBars("Tender Bar") cmd.controls("&kc").Enabled = False End Sub Private Sub CommandButton1_Click() enable End Sub Sub enable() Dim cmd As CommandBar Set cmd = CommandBars("Tender Bar") cmd.controls("&kc").Enabled = True End Sub |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
set cmd = Application.commandbars("Tender Bar")
-- Regards, Tom Ogilvy "tango" wrote in message om... Dear Frank, I do not understand your reply. why you said duplicate? can explain. thanks alot Dear All, why beforeclose i got this message at set cmd = commandbars("Tender Bar") run time error 91 object variable or with block variable not set? click commandbutton works fine. pls help. thanks Private Sub Workbook_BeforeClose(Cancel As Boolean) disable End Sub Sub disable() Dim cmd As CommandBar Set cmd = CommandBars("Tender Bar") cmd.controls("&kc").Enabled = False End Sub Private Sub CommandButton1_Click() enable End Sub Sub enable() Dim cmd As CommandBar Set cmd = CommandBars("Tender Bar") cmd.controls("&kc").Enabled = True End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
error message Method €˜Add of object €˜CommandBar Controls fail? | Excel Discussion (Misc queries) | |||
In-place CommandBar.Add run-time error | Excel Discussion (Misc queries) | |||
run-time error '91'-Close Button error | Excel Discussion (Misc queries) | |||
commandbar at workbook before close - run time error | Excel Programming | |||
When running workbook.close True Excel generates an error!!! | Excel Programming |