Export to Excel (1 Viewer)

John Big Booty

AWF VIP
Local time
Tomorrow, 03:26
Joined
Aug 29, 2005
Messages
8,263
I've been having a play with the function posted here by ajetrumpet and have run into trouble with the line of code;
Code:
Dim xl As New Excel.Application
I'm getting a Compile error "User-defined type not defined" What should that line read?
 

JANR

Registered User.
Local time
Today, 19:26
Joined
Jan 21, 2009
Messages
1,623
Set refrence to excel, the code uses early-binding ?

JR
 

John Big Booty

AWF VIP
Local time
Tomorrow, 03:26
Joined
Aug 29, 2005
Messages
8,263
Sorry I'm not quite sure I follow :confused:
 

JANR

Registered User.
Local time
Today, 19:26
Joined
Jan 21, 2009
Messages
1,623
Do you have set refrence to Excel ?

In the VBA window under Tools - Refrence Make sure you have selected Microsoft Excel

JR
 

vbaInet

AWF VIP
Local time
Today, 18:26
Joined
Jan 22, 2010
Messages
26,374
John,

In the VBA editor:

TOOLS > REFERENCES > tick "Microsoft Excel X.0 Object Library" > hit OK.

Where X depends on your version of Excel. 11 will be for 2003 and 12 for 2007.
 

vbaInet

AWF VIP
Local time
Today, 18:26
Joined
Jan 22, 2010
Messages
26,374
Always good to see :confused: or :( or even :mad: change to :D or at least :)

Lol.
 

JANR

Registered User.
Local time
Today, 19:26
Joined
Jan 21, 2009
Messages
1,623
The town is called Kongsberg which is about 1 hours drive from the capital Oslo.

The town is most famous for its silvermines which was in service 1623-1958, now it's mostly hightech defence and offshore companys who runs the town.

JR :)
 

John Big Booty

AWF VIP
Local time
Tomorrow, 03:26
Joined
Aug 29, 2005
Messages
8,263
Thanks JANR, just curious as my sister moved to Bergen earlier this year for work. So Norway is now at the top of our must visit list :D
 

JANR

Registered User.
Local time
Today, 19:26
Joined
Jan 21, 2009
Messages
1,623
Bergen, bring an umbrella.. :D the town in Norway which gets the most rain.

JR
 

Users who are viewing this thread

Top Bottom