Trevor3007

Well-known Member
Joined
Jan 26, 2017
Messages
667
Office Version
  1. 365
Platform
  1. Windows
hi,

using the following to prompt the msgbox:-

Code:
Sub gototots()Range("AI4").Select
    Application.Goto Reference:="R999C34"
    ActiveWindow.SmallScroll Down:=-12
    Range("AI983").Select
    
   If MsgBox("Enter Yes to goto A174?", vbYesNo) = vbYes Then
 
Application.Goto Reference:="R117C1"
    ActiveWindow.SmallScroll Down:=54
    Range("A174").Select
   
Else


End If
End Sub

upon hitting the macro button It should goto AI983 , but would like it to pause say 10 seconds then run the 2nd msg to ask 'are you finished? If so enter Yes..
and it will goto A174 If No then wait 10 seconds & ask the question again?

MTIA
Trevor3007
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
.
Code:
Option Explicit


Sub gototots()
Range("AI4").Select
    Application.Goto Reference:="R999C34"
    ActiveWindow.SmallScroll Down:=-12
    Range("AI983").Select
    Application.Wait (Now + TimeValue("0:00:10"))
    
agn:
   If MsgBox("Enter Yes to goto A174?", vbYesNo) = vbYes Then
 
    Application.Goto Reference:="R117C1"
        ActiveWindow.SmallScroll Down:=54
        Range("A174").Select
       
    Else
        Application.Wait (Now + TimeValue("0:00:10"))
        GoTo agn:


    End If
End Sub
 
Upvote 0
once again..logit sorts my issues!!

Nice one & very much appreciated.(y)
KR
Trevor3007
 
Upvote 0

Forum statistics

Threads
1,214,548
Messages
6,120,146
Members
448,948
Latest member
spamiki

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top