ANY way to trap a missing ref error without allowing access to VBA Project?

Myriad_Rocker

Board Regular
Joined
Dec 1, 2004
Messages
67
I have a VBA application in Excel that is used in multiple versions of Excel (2003, 2007, 2010). It is also used on x86 and x64 servers. The crux of the problem is that when a user downloads my application and puts it on an x64 system, there is a reference that points to just the "Program Files" directory instead of "Program Files (x86)". This causes the reference to be missing.

I cannot let this application access the VBA Project due to security reasons.

Is there any way I can trap this error (Compiler Error in Hidden Module or something like that) and just pop up a message box that tells the user that they have to change that reference?
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Maybe I'm confused...Did you write the VBA application, or is this something that you're trying to adapt.

I gathered from your initial post that you wrote the VBA application. If that's the case, then have your application check the OS type and set the reference then. I don't see why the end-user would have to get involved.

Of course, I could be completely missing something...
 
Upvote 0
Maybe I'm confused...Did you write the VBA application, or is this something that you're trying to adapt.

I gathered from your initial post that you wrote the VBA application. If that's the case, then have your application check the OS type and set the reference then. I don't see why the end-user would have to get involved.

Of course, I could be completely missing something...

Yes, I did write the application. The reason that the user would have to get involved is because they are the ones that are using it. And depending on the server (64 bit or 32 bit), the reference has to be changed. I'm not involved at that point.

From my understanding, you have to "allow access" to the VBA Project, which opens security holes. It's an actual setting. I can't do that for security reasons at customers.

Does that make sense?
 
Upvote 0
Unfortunately no -you can't test to see if the references are broken unless you have trusted access to the VBProject.
 
Upvote 0

Forum statistics

Threads
1,224,522
Messages
6,179,299
Members
452,904
Latest member
CodeMasterX

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top