Hi, the below code displays a message box on sheet "TABLE PROD" when that sheet is selected. The code is in "This Workbook" module. I would like to disable the message box (or have the code answer "yes") when the 2nd macro (TABLE PROD COPYROW) below is run. This macro is one of many macros called in a process and the message box interrupts it. I only need the message box after the group of macros are run. I have been poking around online for a solution, but no luck. One common suggestion "Application.DisplayAlerts = False" doesn't seem to work. Any help is appreciated.
********************
VBA Code:
Private Sub Workbook_SheetActivate(ByVal Sh As Object)
If IsEmpty(Sheets("QUOTE").Range("L9").Value) = False Then
On Error Resume Next
If Sh.name = "TABLE PROD" Then
MsgBox "JIM SEE NOTES: " & Worksheets("quote").Range("L9")
End If
End If
End Sub
********************
VBA Code:
Sub TABLE_PROD_COPYROW()
Application.ScreenUpdating = False
Sheets("TABLE PROD").Activate
Range("A38:Y5000").ClearContents
Range("b2:b2").ClearContents
Range("AA37:AB37").Font.Size = 28 '5/31/20 Steve added this line to increase the size of the barcode
Rows("37:37").Copy
Rows("37:" & Range("A1").Value).Select
Selection.PasteSpecial xlFormulas
Selection.PasteSpecial xlFormats
'Rows("37:" & Range("A1").Value).RowHeight = 36 '5/31/20 May use this line to increase row height due to barcode spacing
Cells.EntireColumn.AutoFit
For i = 1 To ActiveSheet.UsedRange.Columns.Count
Columns(i).ColumnWidth = Columns(i).ColumnWidth + 3
Next i
Application.CutCopyMode = False
ActiveSheet.Columns("b").ColumnWidth = 14
ActiveSheet.Columns("c").ColumnWidth = 20
ActiveSheet.Columns("aa:ab").AutoFit
ActiveSheet.Columns("ab").ColumnWidth = 24
ActiveSheet.Columns("ac:ad").ColumnWidth = 12
ActiveSheet.Columns("aE:af").ColumnWidth = 20
Range("A33").Select
COUNT_CRITERIA
Call TableProdColumnHide '1/11/20 STEVE ADDED
Application.ScreenUpdating = True
Application.DisplayAlerts = True
End Sub