![]() |
Enable/Disable |
Post Reply ![]() |
Author | |
moe188 ![]() Senior Member ![]() Joined: 27 March 2006 Status: Offline Points: 220 |
![]() ![]() ![]() ![]() ![]() Posted: 21 August 2006 at 2:22pm |
Hi,
I am trying to enable a button at run-time erroe but for some reason I can not get it to work and I am recieving a error message:
My code:
Set ControlFile = MenuBar.ActiveMenuBar.Controls.Add(xtpControlPopup, 0, "&File")
With ControlFile.CommandBar.Controls .Add xtpControlButton, FILE_NEW, "&New" .Add xtpControlButton, FILE_OPEN, "&Open" Set Control = .Add(xtpControlButton, FILE_SAVE, "&Save"): Control.BeginGroup = True: Control.Enabled = False Set Control = .Add(xtpControlButton, FILE_PRINT, "&Print"): Control.Enabled = False Set Control = .Add(xtpControlButton, FILE_EXIT, "&Exit"): Control.BeginGroup = True End With and within the commandbar_update
select case control.id
case FILE_PRINT: if PName="" then control.enable=false else control.enable=true
end select
Please Help!
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
code looks right. What error text you see?
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |