Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default pause a macro to display a form for x seconds then end

Hi, I have a macro which basically you click on and it brings uo a form
(Userform2) which you input a password and it unprotects a sheet. what I wish
to do it once the button is clicked display a additional userform (Userform1)
for say 3 seconds saying well done then hide the userform and carry on as
normal.
I have tried the following but does not work :
(put in the userform2 button code)

Private Sub CommandButton1_Click()
UserForm2.Hide
UserForm1.Show
timeDelay = 1
UserForm1.Hide
End Sub

Please help me

Regards
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 126
Default pause a macro to display a form for x seconds then end

Check out XL VBA help for the Application object's Wait method.

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Multi-disciplinary business expertise
+ Technology skills
= Optimal solution to your business problem
Recipient Microsoft MVP award 2000-2005

In article ,
says...
Hi, I have a macro which basically you click on and it brings uo a form
(Userform2) which you input a password and it unprotects a sheet. what I wish
to do it once the button is clicked display a additional userform (Userform1)
for say 3 seconds saying well done then hide the userform and carry on as
normal.
I have tried the following but does not work :
(put in the userform2 button code)

Private Sub CommandButton1_Click()
UserForm2.Hide
UserForm1.Show
timeDelay = 1
UserForm1.Hide
End Sub

Please help me

Regards

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default pause a macro to display a form for x seconds then end

I use this:
Create a form i.e frmKvitto
(In the macro:)

Application.OnTime Now + TimeValue("00:00:03"), "CloseForm"
(Sheets("Meny").Select)
frmKvitto.Show


Public Sub CloseForm()
On Error Resume Next
frmKvitto.Hide
End Sub


"MyKool" skrev:

Hi, I have a macro which basically you click on and it brings uo a form
(Userform2) which you input a password and it unprotects a sheet. what I wish
to do it once the button is clicked display a additional userform (Userform1)
for say 3 seconds saying well done then hide the userform and carry on as
normal.
I have tried the following but does not work :
(put in the userform2 button code)

Private Sub CommandButton1_Click()
UserForm2.Hide
UserForm1.Show
timeDelay = 1
UserForm1.Hide
End Sub

Please help me

Regards

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
pause a macro tsmith Excel Discussion (Misc queries) 9 January 22nd 09 12:47 AM
Pause Macro 2 Ollie Excel Discussion (Misc queries) 3 June 15th 06 04:49 AM
Converting Julian Seconds with a macro to replace old seconds data Keldair Excel Discussion (Misc queries) 2 February 18th 06 12:09 AM
Pause macro, add form button to sheet, continue macro when button clicked! Flystar[_15_] Excel Programming 1 May 26th 04 09:45 AM
Pause during a Macro Marie[_3_] Excel Programming 6 January 18th 04 12:18 PM


All times are GMT +1. The time now is 03:09 AM.

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

About Us

"It's about Microsoft Excel"