Problem with Reference Paths in Excel VBAProject

sjk136

New Member
Joined
Jan 3, 2011
Messages
7
Hi,

I'm struggling in a conversion from using Excel 2003 on XP -> Excel 2010 on Win7.

Microsoft Web Components seems to be the issue.

When I open a SS in Win7, I get an error "An Object could not be loaded".
There is an embedded Microsoft Office Spreadsheet on one of the forms in the SS, which was created using the OWC11.dll in "additional controls" on the form editing tools.
This embedded MOS disappears when opened in Win 7 after getting the error message described above.
When I look into the references, sure enough, the MISSING one is Microsoft Web Components 11.0.
Web Components 11.0 is definitely installed in Win7, and I registered the owc11.dll

I'm thinking the problem may lie in the way the paths are saved in the references.

In XP, EXCEL 2003, the "Location:" to the OWC11.dll is "C:\Program Files\Common Files\Microsoft Shared\Web Components\11\OWC11.dll"
In Win7 EXCEL 2010, the "Location:" to the OWC11.dll looks like "C:\Progra~1\Common~1\Micros~1\WebCom~1\11\OWC11.dll"

Does anyone know what all the (~1)'s are doing in the Win7 location? Is there a way I can save the workbook using this reference, so that XP users and Win7 users can both use the forms at the same time.

Or is the form not working because im not installing something else properly.

Last bit of info: There is one Win7 machine that the form DOES work on, and in the reference location on that machine, the Location doesn't contain any ~1's.

Any light shed would be so appreciated.
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Are the copies of Windows 64 or 32 bit? Same question for Office 2010? You should actually be able to remove the reference altogether as long as you revise your code to use late binding.
 
Upvote 0
What you are seeing is the DOS path, where folders and file names were limited to 8 characters.

So is the path getting tripped up because it can't differentiate between the [Program Files] and [Program Files (x86)]? How would you get around that? I'm assuming the answer is this late binding concept.


Are the copies of Windows 64 or 32 bit? Same question for Office 2010? You should actually be able to remove the reference altogether as long as you revise your code to use late binding.

It is a 64 bit version of windows which we installed 32-bit excel on. I'm going to read up on late binding, i'm unfamiliar.
 
Upvote 0
Is the dll in 'Program Files' or 'Program Files (x86)'? If the latter, then the path is different from 2003, hence the problem. (perhaps the machine where it works has Win7 32 bit, or the dll has been moved)
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,849
Members
452,361
Latest member
d3ad3y3

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