Open an Excel file from VB 6.0 
Author Message
 Open an Excel file from VB 6.0

I'd like to open a workbook but the compilation is not
completed because of the fouth line:

    Dim xlApp As Excel.Application
    Dim xlbook As Excel.Workbook
    Set xlApp = CreateObject("Excel.Application")
    Set xlbook = GetObject("C:\Siebel_macros_pp7Modif.xls")

The error message is: File or class name not found while
Automation operation

I'd like to be able to write this:
  Workbooks.Open "C:\Siebel_macros_pp7Modif.xls"

Can you help me ?

Thanks.



Mon, 20 Sep 2004 17:22:55 GMT  
 Open an Excel file from VB 6.0


Quote:
> I'd like to open a workbook but the compilation is not
> completed because of the fouth line:

>     Dim xlApp As Excel.Application
>     Dim xlbook As Excel.Workbook
>     Set xlApp = CreateObject("Excel.Application")
>     Set xlbook = GetObject("C:\Siebel_macros_pp7Modif.xls")

> The error message is: File or class name not found while
> Automation operation

> I'd like to be able to write this:
>   Workbooks.Open "C:\Siebel_macros_pp7Modif.xls"

Set xlbook = xlApp.Workbooks.Open("c:\siebel_macros_pp7modif.xls")


Tue, 21 Sep 2004 01:55:56 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Excel input file for VB 6.0, HELP

2. An EXE file open with VB 6.0

3. Opening an excel file through a form/running excel macros through access

4. Excel file opened in IE3 - on one machine starts Excel, others does not

5. Accessing an Excel file without opening Excel

6. Reading Excel files without opening excel

7. open doc/excel file in frame with Word/Excel menubar

8. Applying Excel Autofilter when opening Excel Files

9. Open Excel File (Excel.Application)

10. need help: Open Excel, run macro, save file, close Excel

11. Excel - VBA - Retreive file without opening them in Excel

12. Open up a file (such as word/excel) in vb.net

 

 
Powered by phpBB® Forum Software