How to create an Excel file from VB?

Smokefox66
07-27-2001, 12:17 PM
Hello!

Here's a question! I need to create an excel file from scratch, using VB code. I created an object indtance of Excel.Application, then what?

I couldn't see any "Save" methods for Excel.Application or Workbook or Sheet.... am I missing something?

Thanks guys!

Thinker
07-27-2001, 12:23 PM
There are Save and SaveAs methods for the Workbook object. In addition, you can add a Boolean True to the Close method to make it save. I would think you would need to use the SaveAs the first time.

KesleyK
07-27-2001, 01:21 PM
If all you have is the Excel application, you'll need:

xls.Workbooks.Add

where xls is the Excel.Application object.

______
Cheers!

"Where there's a will, I want to be in it!" -- unknown

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum