Linker IT Software
Google
Web www.oraxcel.com
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
Compile Error (Read 6094 times)
alfie
YaBB Newbies
*


I Love SQL*XL

Posts: 3
Compile Error
08.05.08 at 16:29:47
 
I have recorded a macro to connect to a database and pull the data I need.
 
the problem is that when I try to run the macro I get a "Compile Error: Sub or function not defined" and it highlights Targets from the line
 
Set SQLXL.Sql.Statements(1).Target = Targets(litExcel)
 
Any Idea what I am doing wrong?
Back to top
 
 
  IP Logged
Gerrit-Jan Linker
YaBB Administrator
*****




Posts: 75
Re: Compile Error
Reply #1 - 10.05.08 at 10:50:12
 
There is indeed a problem with the Targets function. In fact it should work when you erase this line of code as if there is no target specified the Excel target will be used.
 
Nevertheless, somehow the Targets function was lost in version 4.2.8. I believe version 4.2.4 still has it.
I am currently working on version 4.3.0 in which I reinstroduce the function.
Back to top
 
 

Gerrit-Jan Linker
Linker IT Software
Email WWW Gerrit-Jan Linker   IP Logged
alfie
YaBB Newbies
*


I Love SQL*XL

Posts: 3
Re: Compile Error
Reply #2 - 12.05.08 at 17:42:47
 
Is there a workaround for the following:
 
With Targets (litExcel)
.autofit = true
.autoformat = true
.
.
.
 
End With
 
Because this errors also...
Back to top
 
 
  IP Logged
Gerrit-Jan Linker
YaBB Administrator
*****




Posts: 75
Re: Compile Error
Reply #3 - 12.05.08 at 19:00:15
 
As said in a post higher up in this thread the Targets property was lost by accident. It has already been added again in version 4.3.0 which I hope to release in the next week or so.
 
In the meantime you may try this:
 
With SQLXL.Sql.Statements(1).Target
.autofit = True
.autoformat = true  
.  
.  
.  
 
End With
Back to top
 
 

Gerrit-Jan Linker
Linker IT Software
Email WWW Gerrit-Jan Linker   IP Logged
alfie
YaBB Newbies
*


I Love SQL*XL

Posts: 3
Re: Compile Error
Reply #4 - 12.05.08 at 19:19:37
 
Ahhh that worked!!! thank you!  
 
I await the new version Smiley
Back to top
 
 
  IP Logged
Pages: 1