But it also opens up a new workbook for some reason
Yes a new workbook with one sheet
have some code which creates a workbook. I want the workbook to have
only 1 sheet
It is doing what you want
--
Regards Ron De Bruin
http://www.rondebruin.nl
"aerotops" wrote in message oups.com...
Thanks guys. I tired to use Ron's method of:
Workbooks.Add(xlWBATWorksheet)
I don't know what xlWBATWorksheet is but I included that line in my
code and it works. But it also opens up a new workbook for some reason.
Any thoughts why and how to stop it from doing that?
Ardus suggested Application.SheetsInNewWorkbook = 1
If I implement that, is this something like
Application.DisplayAlerts=Flase and just like we set
Application.DisplayAlerts = True at the end of the sub, would I have to
set:
Application.SheetsInNewWorkbook = 3 at the end of my set to go back to
Excel's default behavior.
Harsh.