![]() |
Set condition of button on click
Does anyone know how to use code or some other method to set the active state
of a button once you click it? What I would like to happen is for Button1 to be able to be clicked once, and then turn inactive (gray) until Button2 is clicked. Any help would be appreciated. Thanks in advance, Robb |
Set condition of button on click
Robb,
You've pretty much got it, in words, so in code: Private Sub CommandButton1_Click() CommandButton1.Enabled = False End Sub Private Sub CommandButton2_Click() CommandButton1.Enabled = True End Sub NickHK "Robb Quirk" wrote in message ... Does anyone know how to use code or some other method to set the active state of a button once you click it? What I would like to happen is for Button1 to be able to be clicked once, and then turn inactive (gray) until Button2 is clicked. Any help would be appreciated. Thanks in advance, Robb |
Set condition of button on click
Thank you very much - that worked like a charm. I knew there was a simple
solution. :) Robb "NickHK" wrote: Robb, You've pretty much got it, in words, so in code: Private Sub CommandButton1_Click() CommandButton1.Enabled = False End Sub Private Sub CommandButton2_Click() CommandButton1.Enabled = True End Sub NickHK "Robb Quirk" wrote in message ... Does anyone know how to use code or some other method to set the active state of a button once you click it? What I would like to happen is for Button1 to be able to be clicked once, and then turn inactive (gray) until Button2 is clicked. Any help would be appreciated. Thanks in advance, Robb |
All times are GMT +1. The time now is 01:47 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com