LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Move Around Excel While VBA code is running.

I am trying to figure out what code I can insert in here that would allow me
to work with this workbook while this code is running. I came across a snipet
and then my computer shut down as i was in the middle of trying to take down
the example but it had something to do with a Do While.... DoEvent..
statement. Can anyone help me with this please.
Sub settime()

MsgBox "IF YOU WISH TO START OVER, CLICK EXCEL AND HIT THE ESC KEY"
Application.WindowState = xlMinimized

Range("B3").Value = Time()
Call counttime

End Sub
----------------------------------------------
Sub counttime()

On Error GoTo handleCancel
Application.EnableCancelKey = xlErrorHandler
If Range("B5").Value TimeValue("00:07:01") Then Exit Sub

Do Until Range("B5").Value TimeValue("00:07:00")
Range("B4").Value = Time()
If Range("B5").Value < TimeValue("00:04:00") And Range("B5").Value
TimeValue("00:03:59") Then
Application.WindowState = xlNormal
msg = MsgBox("YOU ARE AT 4 MINS NOW", vbOKCancel)
If msg = vbCancel Then Exit Sub
If msg = vbOK Then
Application.WindowState = xlMinimized
End If

End If
Loop
'Application.WindowState = xlNormal
UserForm1.Show

handleCancel:
MsgBox "You Have Requested To Start Over"

End Sub

 
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
Problem Running Code in Excel 2003 Mark Excel Programming 1 June 17th 05 12:45 AM
More then 1 Excel object running at same time , how can I refer to right one in code? Dave Lauberts Excel Programming 5 October 28th 04 03:57 PM
Userfrom code in written in Excel 2000 running in Excel 97 KimberlyC Excel Programming 1 February 11th 04 08:45 PM
Running Code on Each Sheet in an Excel Workbook bearie Excel Programming 2 February 6th 04 03:54 PM
VB code needed for running newer excel version macros in older excel versions Tom Excel Programming 6 October 16th 03 03:11 AM


All times are GMT +1. The time now is 05:08 PM.

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"