Writing to Excel Spreadsheet Code:
Function RPT_SnapShot(WhichReport,Tstatus,Sby,Sd,Ed)
On Error 213 Goto EarlyStop
Working code here
GetFormat:
Call PGM_XLFormatting(xlApp, xlWorkbook, xlsheet,status,TOselect,TOfilterBy,startdate,endDate,WhichReport,collected)
End With
TheEnd:
Set xlsheet = Nothing
Set xlWorkbook = Nothing
Set xlApp = Nothing
Print MessageAllDone
Sleep 3
Exit Function
EarlyStop:
Msgbox “Error” & Error$ & " Line: " & Erl
Resume GetFormat
End Function
Problem:
When a user clicks inside an Excel Cell it causes an error 213 to occur. This error displays under the excel spreadsheet and then must be clicked for the final formatting to occur. How can I get this MsgBox to display on top?
Required:
Spreadsheet must be visible at all times and cannot prevent user from causing the 213.