need help with timer button

I

ionaman

In the attached excel file, I am wondering is anyone able to put a time
on it for me. When the Hint button is pressed a text GUI appears. I wa
wondering does anyone know how to just have this GUI appear for 3
seconds. all help and comments appreciated

Attachment filename: latestversion.xls
Download attachment: http://www.excelforum.com/attachment.php?postid=51011
 
B

Bob Phillips

Here is an example of a timed msgbox.

Dim cTime As Long
Dim WSH As Object

Set WSH = CreateObject("WScript.Shell")
cTime = 30 ' 30 secs
Select Case WSH.Popup("Don't do it!", cTime, "Hint", vbOKCancel)
Case vbOK
MsgBox "You clicked OK"
Case vbCancel
MsgBox "You clicked Cancel"
Case -1
MsgBox "Timed out"
Case Else
End Select


As you can see, it can be OK, Cancel or timed out.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
I

ionaman

Hi Bob,
Thanks for the reply. How would I implement this into the excel file
Sorry for what is a stupid question but I am not very good a
programming
 
S

SlimPickins

I can't help with your problem........but.......I want to put buttons
on a workbook I'm building.

How do you do it.

Slim
 
I

ionaman

right click on the top of the excel sheet where if u scroll down i
gives u the option of visual basic. click on this and then click th
control toolbox button. this allows u to put in label
 
B

Bob Phillips

Go to the VBE (Alt-F11), Insert a module (menu Insert>Module), and paste the
code. Adjust to your text and your circumstances.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top