Hi i use the following code for message alert box,
Problem is the MsgBox does not show when my mouse on other monitor, ( duel monitor setup), Excel doesn't give the focus to the MsgBox.
The Excel icon will blink in the taskbar and if we click it, Excel shows message bsgbox.
Would there be anyway to fix this?
Problem is the MsgBox does not show when my mouse on other monitor, ( duel monitor setup), Excel doesn't give the focus to the MsgBox.
The Excel icon will blink in the taskbar and if we click it, Excel shows message bsgbox.
Would there be anyway to fix this?
VBA Code:
Private Sub Worksheet_Alert()
Dim Msg As Long
Dim myRange As Range
Set myRange = Sheet85.Range("BD1:BD99")
Dim cell As Range
For Each cell In myRange
Evaluate (cell)
If StrComp(cell, "Yes", vbTextCompare) = 0 Then
Cells(cell.Row, "BA") = 99999
Msg = MsgBox("" & vbCrLf & " " & Range("BI" & 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:BE99")
For Each cell In myRange
Evaluate (cell)
If StrComp(cell, "Yes", vbTextCompare) = 0 Then
Cells(cell.Row, "BC") = 99999
Msg = MsgBox("" & vbCrLf & " " & Range("BJ" & 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