VB6: Accessing Excel spreadsheets 
Author Message
 VB6: Accessing Excel spreadsheets

Quote:

> Hi,

> I have the following code in one of my programs. Basically, all I'm trying
> to do is open an Excel spreadsheet, write some data, then close it - pretty
> simple.

> But I keep getting an error teeling me the query string is incomplete and I
> can't seem to figure out why.

> If anyone has any experience in accessing Excel sheets using VB6, and can
> either help me with the code below or offer an alternative method, I'd be
> very grateful.

 <snip>

  Looks like you're trying to copy records into XL by looping thru a set
of records you've connected to TextBoxes via Adodc1.  Not sure I'd use
that approach, but it can be done.  Could you explain a little more
about the records you're trying to copy into the XL sheet?  Do they have
3 fields (guessing from your AddNew code)?
  Seems to me there's trouble with your syntax.  I'm not sure about your
CommandText - "SELECT * from [Sheet1$]" will work, but it looks like
you're also trying to select certain rows of the spreadsheet?
  Prior to running your code, do you plan to have any data already on
Sheet1?
  I'll try to offer more specific ideas if you'd like to discuss
further.
--
Jim in Cleveland
If you're writing to me, in my address
change "REAL_Address.see.below" to "worldnet.att.net"
 ((("What's so funny 'bout peace, love & understanding?" - Nick Lowe)))



Wed, 09 Oct 2002 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. How to link a passwd protected Excel spreadsheet to Access in VB6

2. linking an excel spreadsheet to an access database from vb6

3. Save embedded excel spreadsheet in access to excel file

4. problem with access coding accessing an excel spreadsheet

5. ADO Data Control cannot connect to Excel Spreadsheet in VB6

6. VB6 Form-based editor for an Excel spreadsheet?

7. VB6 project reading/writing Excel spreadsheet

8. Updating an existing Excel Spreadsheet with VB6

9. Help - Need to open an Excel spreadsheet in VB6

10. Opening Excel 2000 Spreadsheet from VB6

11. Formatting an Excel spreadsheet from Access

12. running code from Access that runs code in an excel spreadsheet

 

 
Powered by phpBB® Forum Software