469,357 Members | 1,593 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,357 developers. It's quick & easy.

How to declare a variable as an excel worksheet in vba

48
i am using access 2007 and i am trying to read data directly from a spreadsheet. i am running into this error User defined object not defined. i am declaring the variable as follow
dim Mywb as workbook
dim Myws as worksheet
Dec 20 '11 #1

✓ answered by Rabbit

Assuming you've included the reference to the Excel library, you need to qualify it using Excel.. Meaning you need to use Excel.Workbook

2 1674
Rabbit
12,516 Expert Mod 8TB
Assuming you've included the reference to the Excel library, you need to qualify it using Excel.. Meaning you need to use Excel.Workbook
Dec 20 '11 #2
almaroc
48
Thanks Rabbit that took care of it. i really appreciate it.
Dec 21 '11 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by Steve Kershaw | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.