Excel 2010 Macros not running in Excel 2016

ChuckDrago

Active Member
Joined
Sep 7, 2007
Messages
470
Office Version
  1. 2010
Platform
  1. Windows
Hi everyone,

I hope this is only a setup condition that someone identifies, but the transition from Windows 7 and Excel 2010 to Windows 10 and Excel 2016 has caused a lot of agita.
For starters, environ("username") was not recognized (compile error Can't find project or library). Found out that Application.UserName is accepted. Next compile issue, same message, for a string formatting (i.e. UCase(Left(… )) failed on the Left clause. Did VBA change that much???
Tools, Reference shows all required checkmarks (the only MISSING is MS Calendar Control 11.0, not used on the macro in question).
Any suggestions will be enormously appreciated.
Thank you,
Chuck
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
It is the MISSING reference which causes most of your compile errors. Uncheck that and you should be good to go mostly.
 
Upvote 0
Environ("...") works with 2016 (as does Left), but be warned that Application.UserName is not the same as Environ("username")

Are you moving from a 32bit version of Office to a 64bit Version? If so MS recommends (in most cases) using 32bit, so it might be an idea to re-install as 32bit.
Have you checked that the references are the same between a computer using 2010 & one using 2016?
 
Upvote 0
Environ("...") works with 2016 (as does Left), but be warned that Application.UserName is not the same as Environ("username") ABSOLUTELY TRUE. THANKS FOR THAT, FLUFF

Are you moving from a 32bit version of Office to a 64bit Version? If so MS recommends (in most cases) using 32bit, so it might be an idea to re-install as 32bit.
Have you checked that the references are the same between a computer using 2010 & one using 2016?

JKPieterse and Fluff - Immensely grateful. Removing the MISSING did it. Fluff, we moved 64 bit to 64 bit. so I presume that shouldn't matter... or does it? Your observation on UserName was valuable. Thank you both again.

Chuck
 
Upvote 0
Glad we could help & thanks for the feedback.

If both are 64bit, there shouldn't be a problem.
 
Upvote 0

Forum statistics

Threads
1,214,424
Messages
6,119,401
Members
448,893
Latest member
AtariBaby

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