Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Dev in Excel 2016 - but problems in Excel 2010 (Option Explicit)

Posted on 2016-10-28
4
Medium Priority
?
69 Views
Last Modified: 2016-11-01
I developed an Excel VBA application in Excel 2016, to be deployed for running in Excel 2010.

In Excel 2010 I get an error "Can't find project or library"

On looking into this I find that ...
Excel 2010 seems to default to Option Explicit. Although I should (!) I have not declared all my variables. How can I turn Option Explicit on?

BUT more interestingly ....!
When I go to the IDE and look in Tools, References is greyed out. So I can't even check if any component is 'missing'.

What's going on here?
Thanks
0
Comment
Question by:hindersaliva
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 

Author Comment

by:hindersaliva
ID: 41863758
Got more info!

I created a small Excel 2016 test of minimal code getting data from an Access 2016 db via ADO. On this it does not mind variables not being declared AND I can get into Tools > References.

This is rather puzzling!
Any thoughts welcome.
0
 
LVL 35

Assisted Solution

by:Norie
Norie earned 2000 total points
ID: 41863777
When you goto Tools>References... and it's greyed out is there any code being executed or anything else going on.

By the way, Option Explicit is not default in Excel 2010 (or any other version that I've used) and I doubt Option Explicit is the cause of the problem anyway.
0
 

Author Comment

by:hindersaliva
ID: 41863783
Haaaaaaa!

Yes. The 'greyed out' because I was in break mode. Doh!

The reason I getting an 'Option Explicit' mystery (and yes I thought so too Norie, re. it being a default as I had never come across that in my 2010 days) .... I had 'Missing Outlook 2016 Library'. But oddly the code I was running had no need to use that library! So it's still a mystery though I think I'm on my way to clearing this.

In short, I need select the Outlook 2010 Library in Tools > References. Did that and it works.
0
 
LVL 35

Accepted Solution

by:
Norie earned 2000 total points
ID: 41863831
That should fix it but if you are going to develop across versions I would recommend developing in the earliest version and/or using late binding.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
If you need to forecast numbers -- typically for finance -- the Windows and Mac versions of Excel 2016 have a basket of tools to get the job done.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question