Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » microsoft excel training company borough high street london - Excel VBA buttons/images
microsoft excel training company borough high street london - Excel VBA buttons/images
Resolved · Low Priority · Version Standard
Excel VBA buttons/images
Can I create a button that is replaced by an image( after it is clicked and the proceedure it runs has run)?For upcoming training course dates see: Pricing & availability
RE: Excel VBA buttons/images
Hi JenniferThanks for your question. Can I just check that I have understood your question. A user will click the button. This will run the associated procedure and also remove the button. Finally and image will be displayed where the button was position.
Thanks
Andrew
RE: Excel VBA buttons/images
Yes that's exactly right.
RE: Excel VBA buttons/images
Hi JenniferThank you for your question
If you create the command button and the picture on the form.
In the properties form, set the visible property of the button to true, and the visisble property of the picture to false.
Then double click on the button to open the code window for the on click property.
Then enter the following lines of code
Me.cmd1.Visible = False
Me.Image1.Visible = Truewhere cmd1 is the name property of the command button, and image1 is the name property of the picture.
I hope this goes someway to solving your problem. If you need to refine things, let me know
Regards
Stephen
|
|
» Forum post: Microsoft Access |



Course updates

