Linker IT Software
menubar-top-links menubar-top-rechts
Home Help Search Login
Welcome, Guest. Please Login.
SQL*XL: Database to Excel bridge litLIB: Excel power functions pack ExcelLock: Locking and securing your valuable Excel spreadsheets encOffice: Protect your Excel file easy and safe encOffice: Protect your Excel file easy and safe
Pages: 1
setTextFromWorkSheet (Read 3225 times)
Gerrit-Jan Linker
YaBB Administrator

Posts: 75
16.06.08 at 22:20:46
How can I call / use a sql-syntax on a specified worksheet?
The following syntax doesn't work:
SQLXL.Sql.setTextFromWorkSheet (Range("SQL!D10:D17")), True

It looks nearly correct. I am not too sure about the brackets around the range statement. Obviously I don't know either whether the SQL sheet exists. That is something for you to check. By not coding the workbook name you assume that the workbook containing the SQL is the active workbook. You can make it specific using this notation for the cell address that includes the workbook name: [myworkbook.xls]SQL!D10:D17
I have just recorded this statement. Did you know you can record all of the SQL*XL syntax. Just enable the macro recorder and record snippets of code. Much easier than doing it yourself!
  SQLXL.Sql.setTextFromWorkSheet Range("Sheet1!B3"), True

Back to top
« Last Edit: 16.06.08 at 22:22:22 by Gerrit-Jan Linker »  

Gerrit-Jan Linker
Linker IT Software
Email WWW Gerrit-Jan Linker   IP Logged
Pages: 1