X
xp
I have two custom toggle buttons on the ribbon and they work sometimes but it
is very clunky. When I first open the file the ribbon works.
But it seems sometimes if I switch to another file and/or do some other
tasks, then go to use either toggle, I get "Object variable or with block
variable not set". If I close and reopen the ribbon file again it works again
--- for awhile.
The error is on this line: gRibbonUI1.InvalidateControl ("rxTB1")
I think the variable gRibbonUI1 which is set to "ribbon" is falling out of
scope (gRibbonUI1 is declared at module level as a Public variable). But, if
this is the case, then any code requiring invalidation of the ribbon is
unstable and basically useless...unless of course my code is goofed up, which
is highly possible.
Can anyone help me through this issue?
Thanks!
is very clunky. When I first open the file the ribbon works.
But it seems sometimes if I switch to another file and/or do some other
tasks, then go to use either toggle, I get "Object variable or with block
variable not set". If I close and reopen the ribbon file again it works again
--- for awhile.
The error is on this line: gRibbonUI1.InvalidateControl ("rxTB1")
I think the variable gRibbonUI1 which is set to "ribbon" is falling out of
scope (gRibbonUI1 is declared at module level as a Public variable). But, if
this is the case, then any code requiring invalidation of the ribbon is
unstable and basically useless...unless of course my code is goofed up, which
is highly possible.
Can anyone help me through this issue?
Thanks!