Reference Excel.Application in Visio VBA

Started by Lars-Erik, April 25, 2008, 06:06:17 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Lars-Erik

I'm trying a microsoft example (http://msdn2.microsoft.com/en-us/library/aa140253(office.10).aspx), when i try to generate the excel BoM i get an error.

Roughly translated:
"A user defined data type is not defined"

VBA tells me the problem is somewhere with
Dim appExcel As Excel.Application

Anyone know why its not doing this?

Commenting shows me it also crashes on:

Dim xlBook As Excel.Workbook
Dim xlSheet As Excel.Worksheet

- Lars-Erik


aledlund

#1
did you include the excel libraries in your references

Visio Guy

#2
Tools > References when you're in the VBA editor...
For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

Lars-Erik

#3
That did it, thanks...