Excel 2010 Macros not running in Excel 2016

ChuckDrago

Active Member
Joined
Sep 7, 2007
Messages
460
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
 

jkpieterse

Well-known Member
Joined
Dec 3, 2007
Messages
972
It is the MISSING reference which causes most of your compile errors. Uncheck that and you should be good to go mostly.
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
32,450
Office Version
365
Platform
Windows
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?
 

ChuckDrago

Active Member
Joined
Sep 7, 2007
Messages
460
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
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
32,450
Office Version
365
Platform
Windows
Glad we could help & thanks for the feedback.

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

Forum statistics

Threads
1,082,641
Messages
5,366,713
Members
400,915
Latest member
NFlem

Some videos you may like

This Week's Hot Topics

Top