mvolz47

Migrate VBA Code in v9.3.1 Mxt to V10.0 Mxd

Discussion created by mvolz47 on Mar 8, 2012
Latest reply on Mar 8, 2012 by mvolz47
To All VBA Users:

I have VBA code in a mxt from v9.3.1 that I want to migrate to a mxd in v10.0 that will serve as a template since mxts are no longer supported in v10.0. (I know VBA is being deprecated at v10.1, but development resources are not available for at least 6 months to migrate to VB.NET and the VBA application is needed ASAP).

I have opened the mxt in v9.3.1 and saved it as a mxd.

1.) First I opened the new mxd in v10.0 and the VBA code did not work (A custom toolbar was in the mxt which referenced the VBA code).  I'm not sure it is the code itself or the fact that the code in the mxd in still referencing an mxt that is no longer supported.

2.) I then copied this mxd into the location for templates in v10.0 \\"Computer name"\c$\Documents and Settings\"User"\Application Data\ESRI\Desktop10.0\ArcMap\Templates.  I then opened a new mxd with the saved mxd as a template, but the code and toolbar are not available in the mxd.

I have two questions in regards to this issue.  If the tools did not work in the mxd itself where the code is available and the references all point to v10.0 objects, is it reasonable to assume that some of the objects changed in v10.0 so the code itself might need to be changed (I find this improbable because ESRI does not usually update objects when they say the objects are being deprecated in the near future)?

Or does the code not work because the VBA code and toolbar need to be recreated in the v10.0 mxd by importing the forms and modules from v9.3.1 into the v10.0 mxd and associating the tools with this imported code?

Any help or hints regarding this task are greatly appreciated.  Thanks.

Outcomes