lezawang
Well-known Member
- Joined
- Mar 27, 2016
- Messages
- 1,805
- Office Version
- 2016
- Platform
- Windows
Hi
I removed application from the second line like this
but that did not work, excel gave me the warning. Why I need to add Application.
in this case? because with workbooks, I do not need to add Application.
So I can say
instead of
but that is not the case with DisplayAlerts. Thank you very much.
I removed application from the second line like this
Code:
DisplayAlerts = False
in this case? because with workbooks, I do not need to add Application.
So I can say
Code:
workbooks.add
Code:
application.workbooks.add
Code:
Sub deletesheet()
Application.DisplayAlerts = False
Dim x As Integer
x = InputBox("enter sheet#")
Workbooks(1).Worksheets(x).Delete
Application.DisplayAlerts = True
End Sub
Last edited: