Moving Excel/vba code from windows 7 to windows 10 H E L P

sedgefield01

New Member
Joined
Feb 17, 2016
Messages
4
I have a rather large application ( over 9,000 lines of code) written in excel and Visual basic. It was developed under windows 7 Home Premium and works fine in that environment. When I copy the file to a thumb drive and try to execute it in either windows 8 or 10 I get the message
"Can't find project or library".

The reference dialog boxes are different under the 7 and 10 versions.

VERSION 7

Visual Basic for applications
Microsoft Excel 12.0 object library
OLE Automation
Microsoft Office 12.0 object library
Microsoft Forms 2.0 object library
Microsoft Windows Common Controls-2 6.0(SP6)

VERSION 10

Visual Basic for applications
Microsoft Excel 15.0 object library
OLE Automation
Microsoft Office 15.0 object library

When I browse the reference dialog box under windows 10 the following references are not shown so I cannot activate them for the compiler:

Microsoft Forms 2.0 object library
Microsoft Windows Common Controls-2 6.0(SP6)

I suspect one or more of the libraries present in the 7 version must be moved to the 10 version. Thanks to this web site I was able to identify FM20.DLL as one possible missing file. There may be others.

Here are my questions (sorry for the long preamble)

1. Does FM20.DLL as it exists in version 7 have to moved to the windows 10 environment?

2. If so how would you recommend I accomplish that (I have two physical machines, one with 7 and one with 10). The file exists on version 7 in:
c:\Windows\SysWOW64\FM20.DLL

Where would I put the file so that it would be recognized by version 10?

3. Do you know if there are any other libraries or files that will need to be moved?

I am dead in the water until I can get this resolved. Any help would be very much appreciated.
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
I have a rather large application ( over 9,000 lines of code) written in excel and Visual basic. It was developed under windows 7 Home Premium and works fine in that environment. When I copy the file to a thumb drive and try to execute it in either windows 8 or 10 I get the message
"Can't find project or library".

The reference dialog boxes are different under the 7 and 10 versions.

VERSION 7

Visual Basic for applications
Microsoft Excel 12.0 object library
OLE Automation
Microsoft Office 12.0 object library
Microsoft Forms 2.0 object library
Microsoft Windows Common Controls-2 6.0(SP6)

VERSION 10

Visual Basic for applications
Microsoft Excel 15.0 object library
OLE Automation
Microsoft Office 15.0 object library

When I browse the reference dialog box under windows 10 the following references are not shown so I cannot activate them for the compiler:

Microsoft Forms 2.0 object library
Microsoft Windows Common Controls-2 6.0(SP6)

I suspect one or more of the libraries present in the 7 version must be moved to the 10 version. Thanks to this web site I was able to identify FM20.DLL as one possible missing file. There may be others.

Here are my questions (sorry for the long preamble)

1. Does FM20.DLL as it exists in version 7 have to moved to the windows 10 environment?

2. If so how would you recommend I accomplish that (I have two physical machines, one with 7 and one with 10). The file exists on version 7 in:
c:\Windows\SysWOW64\FM20.DLL

Where would I put the file so that it would be recognized by version 10?

3. Do you know if there are any other libraries or files that will need to be moved?

I am dead in the water until I can get this resolved. Any help would be very much appreciated.


sedgefield01,

I am concerned about this compatibility issue as you are...let me explain...
I have developed a spreadsheet that keeps a separate running total of 5 items, for each day of the week,
for up to 6 weeks per month for a volunteer group to which I belong. I am using Windows 7 and Excel
2007. Because the spreadsheet will be used in a vehicle at various times during the day, it is not convenient
to use a mouse and keyboard. We had thought to use a touchscreen tablet, however, the Excel version
designed for tablets is not the 'full' version and does not support ActiveX or Form Control Command Buttons.

I visited the Microsoft store near home, and after talking with a sales person, and loading my spreadsheet
from a flash drive on a laptop with Windows 10, I determined that the Demo version of Excel is all they had
in the Microsoft store. The Demo version of Excel does not support command buttons. The sales person said
he would take notes and share this with his managers. I left the Microsoft store frustrated by the experience.
Apparently you have to BUY something to determine if it will work or not!! Not a particularly 'satisfying'
customer experience.

A laptop was ordered (not by myself) for the volunteer group that will have Microsoft Windows 8 or Windows
10. We have access to several different Microsoft Office versions, so I will try my spreadsheet and see if any
combination of Windows and Office can run my spreadsheet with touch screen command buttons. I was told
we should have the touch screen computer as early as next week. I will post back with my results.
Meanwhile, I will monitor this thread to see if there is any further clarification on this compatibility problem.
Thank you for sharing this issue with the Forum.

Perpa
 
Upvote 0
Since posting the original question I did some additional research and found that copying a single file from my Windows 7 computer to my Windows 10 computer solved the issue.

Compatibility problem moving from windows 7 to windows 10

There is a problem in moving VBA code from windows 7 to windows 10. There are at least two modules that are available in windows 7 that are not resident on windows 10. Code developed under windows 7 requires these to files to execute properly.

The error manifests as the message “Can’t find project or libraries”. You must reset the project from the visual basic command ribbon and then select references under TOOLS.

The reference dialog box will show you the missing files by prefixing the word “Missing:” before the file name displayed in the dialog box.

If the files are truly missing they can be copied from the Windows 7 environment to the Windows 10 environment.

C:\Windows\SysWow64\COMCT2.OCX (the active X controls)
C:\Windows\SysWow64\FM20.dll

Windows 10 uses the same directory for these files as Windows 7
 
Upvote 0
As far as I'm aware the files you mention aren't Windows files as such, I think they come with MS Office.
 
Upvote 0
Since posting the original question I did some additional research and found that copying a single file from my Windows 7 computer to my Windows 10 computer solved the issue.

Compatibility problem moving from windows 7 to windows 10

There is a problem in moving VBA code from windows 7 to windows 10. There are at least two modules that are available in windows 7 that are not resident on windows 10. Code developed under windows 7 requires these to files to execute properly.

The error manifests as the message “Can’t find project or libraries”. You must reset the project from the visual basic command ribbon and then select references under TOOLS.

The reference dialog box will show you the missing files by prefixing the word “Missing:” before the file name displayed in the dialog box.

If the files are truly missing they can be copied from the Windows 7 environment to the Windows 10 environment.

C:\Windows\SysWow64\COMCT2.OCX (the active X controls)
C:\Windows\SysWow64\FM20.dll

Windows 10 uses the same directory for these files as Windows 7


sedgefield01,
Thanks so much for the feedback...hopefully your information will enable us to transfer the Excel 2007 VBA and spreadsheet to the new computer without a hitch in the days to come. Again, thank you!
Perpa
 
Upvote 0
I hope it helps.

sedgefield01,
My friend was able to load Microsoft Office 2010 onto the new HP laptop which came with Windows 10.
He downloaded all available upgrades from Microsoft and then uploaded the spreadsheet that I created in
Microsoft Office Excel 2007 with form command control buttons. The buttons worked as expected with the
touch screen. We are very pleased. We didn't have to copy the files you described earlier. However, when I
convert my home computer to Windows 10 from Windows 7, I will have the notes you shared to draw from.
Thanks again!
Perpa
 
Upvote 0

Forum statistics

Threads
1,213,536
Messages
6,114,207
Members
448,554
Latest member
Gleisner2

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