![]() |
Option Button visible after a time delay
I would like to make an option button visible 20 seconds after making it
invisible. Any ideas? |
Option Button visible after a time delay
See application.Ontime
http://www.cpearson.com/excel/ontime.htm Chip Pearson's page on this. -- Regards, Tom Ogilvy "Sandy" wrote in message ... I would like to make an option button visible 20 seconds after making it invisible. Any ideas? |
Option Button visible after a time delay
Looked where you suggested, I think I'm on the right lines but can't get
this to work. It's in vba. Private sub ScoreAnswers() "other code" optAdd.Visible = False optSubtract.Visible = False optMultiply.Visible = False optDivide.Visible = False optAny.Visible = False Application.OnTime Now + TimeValue("00:00:20"), "OptVisible" End Sub Private sub OptVisible() optAdd.Visible = True optSubtract.Visible = True optMultiply.Visible = True optDivide.Visible = True optAny.Visible = True End Sub "Tom Ogilvy" wrote in message ... See application.Ontime http://www.cpearson.com/excel/ontime.htm Chip Pearson's page on this. -- Regards, Tom Ogilvy "Sandy" wrote in message ... I would like to make an option button visible 20 seconds after making it invisible. Any ideas? |
Option Button visible after a time delay
What error are you getting? Optvisible not found? If so, make it public
instead of private. Make sure it is in a general module and not in a sheet module or the ThisWorkbook module or in a Userform module. -- Regards, Tom Ogilvy "Sandy" wrote in message ... Looked where you suggested, I think I'm on the right lines but can't get this to work. It's in vba. Private sub ScoreAnswers() "other code" optAdd.Visible = False optSubtract.Visible = False optMultiply.Visible = False optDivide.Visible = False optAny.Visible = False Application.OnTime Now + TimeValue("00:00:20"), "OptVisible" End Sub Private sub OptVisible() optAdd.Visible = True optSubtract.Visible = True optMultiply.Visible = True optDivide.Visible = True optAny.Visible = True End Sub "Tom Ogilvy" wrote in message ... See application.Ontime http://www.cpearson.com/excel/ontime.htm Chip Pearson's page on this. -- Regards, Tom Ogilvy "Sandy" wrote in message ... I would like to make an option button visible 20 seconds after making it invisible. Any ideas? |
Option Button visible after a time delay
Not sure what error you were getting but....
I tried your basic code and got a "Object not found" error. I added a refference to the Worksheet object and it worked. Private Sub ScoreAnswers() Worksheets("Sheet1").OptionButton1.Visible = False Worksheets("Sheet1").OptionButton2.Visible = False Application.OnTime Now + TimeValue("00:00:10"), "OptVisible" End Sub Private Sub OptVisible() Worksheets("Sheet1").OptionButton1.Visible = True Worksheets("Sheet1").OptionButton2.Visible = True End Sub |
All times are GMT +1. The time now is 05:47 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com