This is the result of VBA being out of process in 64 bit version of
Inventor. See the following excerpt from programming help...
Sanjay-
VBA in 64-bit Inventor is implemented only as an out-of-process 32-bit
component. Therefore, for 64-bit Inventor, a 32-bit process is used to host
VBA. Thus all the API calls are out-of-process calls. This has several
implications:
1.. In some cases, API calls can cause Inventor to update its UI. This can
cause your VBA code to slow down. For long operations, where your code makes
multiple calls to Inventor, you can regain performance by disabling the
Inventor UI. To do so, set the UserInterfaceManager.UserInteractionDisabled
property. Please do this carefully, as you are responsible for resetting
this property afterwards. Note that this slowdown does not happen when your
code is responding to an event raised by Inventor.
2.. The FileManager.FileSystemObject property returns Microsoft's
scripting FileSystemObject which is instantiated in Inventor's process
space. Using FileSystemObject directly in 64-bit space gives the wrong
current directory etc. Therefore you should avoid using built-in VBA
functions such as chdir$.
3.. To wait for Inventor to complete processing of pending windows
messages, you need to use UserInterfaceManager.DoEvents instead of the
builtin DoEvents subroutine in VBA.
4.. ThisDocument in Document projects is not supported. You can embed a
VBA project in any Inventor document. Usually in a macro within such a
project, you can use ThisDocument property to refer to the document itself.
With VBA for 64-bit Inventor, ThisDocument object no longer refers to the
document. Instead for 32 & 64 bit VBA compatibility, you will need to
manually replace all the references to ThisDocument by
ThisDocument.InventorDocument.
5.. No VB6 support for creating Addins You can not use VB 6.0 to create
Add-ins for 64 bit Inventor.
6.. Handles in 64-bit Windows are supposed to be 64-bit. However only the
lower 32-bits are significant and the rest are zero. Therefore
Application.MainFrameHWND returns 'long' type which works in 32-bit
Inventor. You just need to "zero out" the higher bits. You can use the
handle in a 32-bit process as well.
7.. Application.GetInterfaceObject32 creates the COM in-proc server object
in the 32-bit host that is used to host VBA. It requires that if the typelib
is also registered in the 64-bit registry, then the methods and properties
should match.
8.. The ApplicationEvents.OnRestart32BitHost event is fired when the
32-bit host process is restarted for any reason.
9.. Some of the Inventor API methods and properties use IPictureDisp
interface when working with icons/images. This interface does not work
across process boundaries. Thus any such methods cannot be used in 64-bit
Inventor VBA.
10.. Use of Me in Document projects is not supported. You can embed a VBA
project in any Inventor document. Usually in a macro within such a project,
you can use Me property to refer to the document itself. On the VBA for
64-bit Inventor, Me object no longer refers to the document. Instead for 32
& 64 bit VBA compatibility, you will need to manually replace all the
references to Me by Me.InventorDocument.