Programming for Different Versions
You can always use the English name of a Commandbar (instead of its local
name), but for controls best to find them with their ID
Set cbMainMenu = Application.CommandBars("Worksheet Menu Bar")
debug.print cbMainMenu.Controls("Help").ID ' 30010 ' in development only
iHelpMenu = cbMainMenu.FindControl(ID:=30010).Index
Regards,
Peter T
"QB" wrote in message
...
So instead on using a NumberFormat = 0.00 , I might need to use 0,00
or
something else based on the user`s regional settings?
Is there anyway to make adaptive code to take into consideration such
issues?
In this particular case, The wrkbk was developed originally in 2003 and
has
automation to create a menu with a button. I use the line
Set cbMainMenu = Application.Commandbars(''Worksheet Menu Bar'')
iHelpMenu = cbMainMenu.Controls(''Help'').Index
Now when I run it it work fine. But when others run it It highlights the
last line. After testing I know that it is unable to find the ''Help''
control? Does the Control name change because they are running a Fr
version
or does the VBA remain unchanged?
QB
"mrkt_rwnd" wrote:
I once had an issue where regional setting for the treatment of
decimal points and commas affected results. Of course it all depends
what your macro is trying to achieve. Try changing the regional
settings on your machine as a test. Best, J
|