Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Option Button visible after a time delay

I would like to make an option button visible 20 seconds after making it
invisible. Any ideas?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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?




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default 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?






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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?








  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default 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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Delay Visible Updates?? Alan Greenwood[_2_] Excel Programming 1 February 24th 05 07:30 AM
Time delay function quartz[_2_] Excel Programming 4 November 10th 04 10:10 PM
Time Delay in VBA John Tolman[_2_] Excel Programming 3 October 27th 04 12:05 AM
Copy/Time Delay Mike Excel Programming 6 October 19th 04 02:26 PM
Time Delay Kilcup[_9_] Excel Programming 3 July 2nd 04 03:39 PM


All times are GMT +1. The time now is 10:34 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"