1

I just upgraded from ArcGIS 9.2 to 10.0, and I'm trying to create some tools using VBA. It doesn't recognize any of the ArcObjects Classes, Interfaces, or Constants unless the reference includes its library name. For example:

Dim pMxDoc as IMxDocument
Set pMxDoc = ThisDocument

doesn't work, but

Dim pMxDoc As esriArcMapUI.IMxDocument
Set pMxDoc = Project.ThisDocument

does.

Does anyone know how to fix this? (FYI I have no admin capabilities on this computer.)

PolyGeo
65.5k29 gold badges115 silver badges350 bronze badges
asked Jan 22, 2013 at 16:36
1
  • This really isn't an ArcGIS 9.2 question. I don't know why that tag was added. Commented Jan 23, 2013 at 15:08

1 Answer 1

2

The dll library directory location and the dll in general have changed going from v9 to v10. I've come across this problem before migrating a .NET Visual Studio project setup from v9 to v10. In my case I just removed the library and added it back in, and it worked fine. I believe in VBA you can only check these libraries on or off, not add and remove them. If your mxd that has the code in it is v9 you might want to convert it to v10 mxd. I would suggest for you to migrate your code into a Visual Studio Add-In project since v10.1 does not support VBA.

Here are some helpful migration links:

Type changes between 9.3 and 10

Migrating VBA customizations to ArcGIS 10

answered Jan 22, 2013 at 23:29
2
  • I am writing the code from scratch, or importing it into VBA from a text file. I'm not opening an existing 9.2 project with 10.0, and editing the code. Commented Jan 23, 2013 at 13:24
  • Code completion works if the library name isn't used, but the code will fail upon execution. Commented Jan 23, 2013 at 13:39

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.