ADOX

P

Phil

Hello

I've been looking at information at the following link:

http://support.microsoft.com/default.aspx?scid=kb;[LN];Q303814

and have tried the following in a VB.net application:

Dim cat As ADOX.Catalog
cat = New ADOX.Catalog
cat.ActiveConnection = "Provider=Microsoft.Jet.OLEDB.4.0;" &_
"Data Source=" & "C:\book1.xls;Extended Properties=Excel 8.0"

i.e. virtually what is given in the Microsoft example.

However, when I run this I get the error message:

"Arguments are of the wrong type, are out of acceptable range, or are in
conflict with one another."

Can anybody help?

Phil
 
P

Phil

Hello Cor

Unfortunately, this does not do what I need i.e. I'm trying to create an
excel file. The link I gave is supposed to work but it doesn't in VB
classic. I know the other way to do it is to use OLE but I'm wondering why
this "classic" code now fails.

Any ideas?

Phil
 
C

Cor Ligthert

Phil,

I have here some links about Excel in VBNet

Office
http://support.microsoft.com/default.aspx?scid=kb;EN-US;311452

http://msdn.microsoft.com/office/

Pia Download
http://www.microsoft.com/downloads/...1e-3060-4f71-a6b4-01feba508e52&displaylang=en

Excel dataset fill and updat
http://support.microsoft.com/default.aspx?scid=kb;EN-US;316934

Excel object model
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odc_vsto2003_ta/html/ExcelObj.asp

I hope that one of those works,

Otherwise maybe a VB classic newsgroup
microsoft.public.vb
and as advice than
microsoft.public.vb.general.discussion

I hope this helps

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top