Results 1 to 3 of 3

Want to modify the Macro to perform additional task

Threaded View

  1. #1
    Forum Contributor
    Join Date
    09-10-2008
    Location
    Phoenix, AZ
    MS-Off Ver
    Office 365
    Posts
    985

    Want to modify the Macro to perform additional task

    Hello Everyone,

    I have a Macro that is set perfect that when the timer reaches five(5) minutes the User receives a popup message "Are you still working with this File? Yes/No

    If the User interacts with the Workbook all is good and the User moves forward with the work or task at hand.

    Here is the question... Can the code be modified so if the user DOES NOT interact with the popup message box by selecting Yes or No that the code will recognize no activity with the Popup and the file is closed.

    Sub TimeSettingCoach()
        CloseTime = Now + TimeValue("00:10:00")
        On Error Resume Next
        Application.OnTime EarliestTime:=CloseTime, _
          Procedure:="Msgbox_BeforeRunningCoach", Schedule:=True
    End Sub
    
    
    Sub Msgbox_BeforeRunningCoach()
     Dim answer As Integer
      
    
     If CloseMode = 0 Then
            Cancel = True
    
            If Not MsgBox("Are you still working with this File?", vbYesNo + vbInformation, "Close Request") = vbYes Then
               Call MacroCoach3
            Else
            Call TimeSetting2Coach
            End If
    End If
     
        End Sub
    Your thoughts appreciated!

    Regards,

    John
    Last edited by JJFletcher; 02-17-2022 at 05:10 PM. Reason: Grammer

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Need to perform task dynamically
    By Shahbaz Aziz in forum Excel General
    Replies: 16
    Last Post: 02-09-2022, 02:59 AM
  2. [SOLVED] Perform two task with one button
    By HaroonSid in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-11-2015, 06:24 AM
  3. [SOLVED] Macro copies and pastes to word, need to modify to copy and paste additional cell values
    By Butcher1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-08-2014, 10:42 AM
  4. Replies: 4
    Last Post: 11-30-2012, 03:14 PM
  5. Perform same task on all worksheets in workbook
    By markrennolds in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-10-2010, 09:52 AM
  6. Perform one task at a time
    By tchristie33 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-09-2007, 06:21 PM
  7. Perform Following Task
    By leo73pk in forum Excel General
    Replies: 1
    Last Post: 09-29-2006, 10:12 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1