View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
FrankAlva FrankAlva is offline
external usenet poster
 
Posts: 1
Default Create new Excel file


Hi,

I would like to create a new excel file from scratch using VBA.
Here's what I got so far

Dim xlApp As Excel.Application, xlBook As Excel.Workbook, xlSheet As
Excel.Worksheet

Set xlApp = CreateObject("excel.application")
Set xlBook = xlApp.Workbooks.Open("c:\test.xls", 0, False, 2)
Set xlSheet = xlBook.Worksheets(1)

Now that is to create a new excel file from and existing on
"test.xls". How would I do it to create one without having an existin
one.

Something like Set xlBook = xlApp.Workbooks.New ??

thank

--
FrankAlv
-----------------------------------------------------------------------
FrankAlva's Profile: http://www.excelforum.com/member.php...fo&userid=1620
View this thread: http://www.excelforum.com/showthread.php?threadid=27720