webdevptg
Board Regular
- Joined
- May 2, 2019
- Messages
- 51
- Office Version
- 365
- 2019
- 2016
- Platform
- Windows
- Web
Hi,
I have a procedure created that will update an excel table in a different book, everything is working perfectly, but I wanted no message to be presented to users.
I am using the display alert = false, but there are still 2 messages I wanted to avoid (message attach post), the one to delete lines and the one to paste values.
I have a procedure created that will update an excel table in a different book, everything is working perfectly, but I wanted no message to be presented to users.
I am using the display alert = false, but there are still 2 messages I wanted to avoid (message attach post), the one to delete lines and the one to paste values.
VBA Code:
....
Application.ScreenUpdating = False
Application.DisplayAlerts = False
if numberRecord > 0 Then
wbTarget.Worksheets("DataBase").ListObjects("GlobalData").Range.AutoFilter Field:=2, Criteria1:=strCriteria
wbTarget.Worksheets("DataBase").ListObjects("GlobalData").DataBodyRange.SpecialCells(xlCellTypeVisible).Delete
End If
wsSource.Range("A5:P44").SpecialCells(xlCellTypeVisible).Copy
wbTarget.Worksheets("DataBase").Range("C" & lastRow).PasteSpecial Paste:=xlPasteValues
Application.DisplayAlerts = True
Application.ScreenUpdating = True