|  | 
| Change button at runtime | 
| Post Reply   | 
| Author | |
| amstel   Newbie   Joined: 23 February 2004 Location: France Status: Offline Points: 18 |  Post Options  Thanks(0)  Quote  Reply  Topic: Change button at runtime Posted: 23 February 2004 at 6:55am | 
| How to change at runtime the status of a button : Enabled=False 
 Sorry, I'm not speak english... French from Paris  | |
|  | |
| robs   Groupie   Joined: 09 November 2003 Status: Offline Points: 84 |  Post Options  Thanks(0)  Quote  Reply  Posted: 23 February 2004 at 7:27am | 
| There are a few different ways. First, you need a handle to the button. You can easily accomplish this in the CommandBars_Execute method. Just take a look at the samples. You could also accomplish this in the CommandBars_ControlSelected method. This method would work well if you want to change the enabled property based on that control or another control being pressed. If you want to change the property based on other conditions, unrelated to the commandBars, try using the CommandBars.FindControl method to get a pointer to your control. Once you have it, just change the enabled property. Also, take a look at the CommandBars_Update method of the Office2003 sample. This gives you the syntax for accomplishing the task. Take a look at the CommandBars_InitCommandsPopUp method of the DynamicPopups sample for an example of using the .FindControl method. Good luck 
 | |
|  | |
| 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 |