msgbox not working?

Trevor3007

Well-known Member
Joined
Jan 26, 2017
Messages
675
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

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
.
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.:beerchug:
KR
Trevor3007
 
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,198
Members
452,616
Latest member
intern444

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