G
Guest
Hi
I am trying to remove the ms office reference library, but have used the
following throughout my application, which requires this reference library:
Application.CommandBars("contactsmenubar").Controls("&Actions").Controls("&Suspended Account").State = msoButtonUp
The problem being msoButtonUp (or msoButtonDown). I have located the
following from an old thread, but am not quite sure how to apply:
"for the declarations you'd change them to object or variant. For the
enums, find the actual value by opening the immediate window and typing
?msoBarTop while you still have a reference....then create your own constant
for that enum, or replace it with the actual value. After you've made the
changes, you should be able to remove the reference and compile."
i have followed this advice and come up with following:
Dim Cbr As Object
Dim Ctl As Object
Set Cbr = Application.CommandBars("contactsmenubar")
Set Ctl = cbr.Controls("&Actions").Controls("&Suspended Account").State = -1
where -1 was the value from ?msoButtonUp in the immediate window, but once
the reference is removed i get an "object required" error.
Any thoughts would be much appreciated.
Thanks
I am trying to remove the ms office reference library, but have used the
following throughout my application, which requires this reference library:
Application.CommandBars("contactsmenubar").Controls("&Actions").Controls("&Suspended Account").State = msoButtonUp
The problem being msoButtonUp (or msoButtonDown). I have located the
following from an old thread, but am not quite sure how to apply:
"for the declarations you'd change them to object or variant. For the
enums, find the actual value by opening the immediate window and typing
?msoBarTop while you still have a reference....then create your own constant
for that enum, or replace it with the actual value. After you've made the
changes, you should be able to remove the reference and compile."
i have followed this advice and come up with following:
Dim Cbr As Object
Dim Ctl As Object
Set Cbr = Application.CommandBars("contactsmenubar")
Set Ctl = cbr.Controls("&Actions").Controls("&Suspended Account").State = -1
where -1 was the value from ?msoButtonUp in the immediate window, but once
the reference is removed i get an "object required" error.
Any thoughts would be much appreciated.
Thanks