Auto close message box after 1 minute

ste33uka

Active Member
Joined
Jan 31, 2020
Messages
415
Office Version
  1. 365
Platform
  1. Windows
Hi i use the following code for a message box, is there anyway it would auto close message box on 1 minute if i have not clicked before then?

VBA Code:
Private Sub Worksheet_Message()
Dim Msg As Long
    Dim myRange As Range
    Set myRange = Sheet85.Range("BD1:BD999")
    Dim cell As Range
    For Each cell In myRange
        Evaluate (cell)
        If StrComp(cell, "Yes", vbTextCompare) = 0 Then
        Cells(cell.Row, "BA") = 999999
        AppActivate Application.Caption
            Msg = MsgBox("" & vbCrLf & " " & Range("BG" & cell.Row).Value & vbCrLf & Range("BP" & cell.Row).Value & vbCrLf & Range("BQ" & cell.Row) & Range("BR" & cell.Row).Value, vbExclamation)
        End If
    Next
        Set myRange = Sheet85.Range("BE1:BE999")

    For Each cell In myRange
        Evaluate (cell)
        If StrComp(cell, "Yes", vbTextCompare) = 0 Then
        Cells(cell.Row, "BC") = 999999
        AppActivate Application.Caption
            Msg = MsgBox("" & vbCrLf & " " & Range("BG" & cell.Row).Value & vbCrLf & Range("BP" & cell.Row).Value & vbCrLf & Range("BQ" & cell.Row) & Range("BR" & cell.Row).Value, vbExclamation)
           
        End If
    Next                 
    End Sub
 
Last edited:

6StringJazzer

Well-known Member
Joined
Jan 27, 2010
Messages
865
Office Version
  1. 365
Platform
  1. Windows
so i can delete "Evaluate (cell)"
I didn't say to delete it. The most important question is why is it there in the first place?

I'll see if I can figure out how to run your code (hard to do without your file) and provide more detailed feedback.
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.

ste33uka

Active Member
Joined
Jan 31, 2020
Messages
415
Office Version
  1. 365
Platform
  1. Windows
I didn't say to delete it. The most important question is why is it there in the first place?

I'll see if I can figure out how to run your code (hard to do without your file) and provide more detailed feedback.
yes i agree it didnt need to be there , not sure how much more detail i can give .
Thanks for your help on this
 

Forum statistics

Threads
1,136,954
Messages
5,678,751
Members
419,782
Latest member
gc75150

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
Top