Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ActiveX Add Excel Suppress Warning Message 1

Status
Not open for further replies.

OrWolf

MIS
Mar 19, 2001
291
0
0
I'm trying to add a new workbook with only 1 sheet. When I attempt to delete the two extra sheets Excel throws warning messages that I don't want. Does anyone know how to suppress / hide these warning messages?

My code:

Set appExcel = CreateObject("Excel.Application")
Set newBook = appExcel.Workbooks.Add
newBook.Worksheets(1).Name = "CustomerList"
newBook.Worksheets(2).Delete FALSE
newBook.Worksheets(2).Delete FALSE
newBook.Worksheets(1).Activate
Set oSheet = newBook.Worksheets(1)
 
I believe teh syntax is something like this?

Code:
appExcel.DisplayAlerts = False

Hope it helps,

Alex

[small]----signature below----[/small]
You can't fit a square data in a round table
 
No problem. Glad it helped :)

[small]----signature below----[/small]
You can't fit a square data in a round table
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top