Left-function causes compile error

Jaymond Flurrie

Well-known Member
Joined
Sep 22, 2008
Messages
921
Office Version
  1. 365
Platform
  1. Windows
What do I miss when the basic left-function of VBA causes "Can't find project or library" error? I haven't personally faced this error yet, but my friend said on some computer my program causes such an error - and in that workbook I created myself, so it should have all the references I used - right? He said that VBA.Left works, so this is pretty interesting (and unheard for me) problem.
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
One thing to check
Go to the VB editor ( ALT + F11)
Select tools / References and see if there any MISSING references
If there are any, have a look here on how to repair them
Code:
http://www.cpearson.com/excel/missingreferences.aspx
 
Upvote 0
One thing to check
Go to the VB editor ( ALT + F11)
Select tools / References and see if there any MISSING references
If there are any, have a look here on how to repair them
Code:
http://www.cpearson.com/excel/missingreferences.aspx
 
Upvote 0
Ok, solved this one and I feel this is important enough to share.

1) The problem was missing Solver add-in - VBA didn't know that whether "left" was in Solver or in VBA library, so it was impossible to know which one to take

2) My program didn't work in every Windows version. It seemed like Excel version mattered something too.

The solution? Make pretty darn sure that when you code for both 32-bit and 64-bit Windows that you have the Solver add-in in BOTH program files AND in program files (x32) folders!

Another option is to check Windows version by VBA, but still the idea is that your problem can more than easily be about "wrong" Program Files folder.
 
Upvote 0

Forum statistics

Threads
1,224,508
Messages
6,179,188
Members
452,893
Latest member
denay

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