VBA Date Picker for Inventor 2014 64-Bit

VBA Date Picker for Inventor 2014 64-Bit

ccoomes
Advocate Advocate
1,728 Views
4 Replies
Message 1 of 5

VBA Date Picker for Inventor 2014 64-Bit

ccoomes
Advocate
Advocate

I am creating a userform in VBA and I need to be able to add dates with a Date Picker.

 

Can someone please tell me how to get a date picker into a Userform in Inventor 2014 64-Bit VBA?

 

I have added the Microsoft Date Picker V6.0 into the 32 Bit System, but I cannot get it to show in the Inventor VBA Module...

 

We can do it by using 2 serpeate text boxes (Day, Month & Year) but our preferred method is with a date picker (As Excel, Access etc).

 

 

0 Likes
1,729 Views
4 Replies
Replies (4)
Message 2 of 5

philippe.leefsma
Alumni
Alumni

The VB6.0 DatePicker control is a 32-bit component. As any other control exposed by MSCOMCT2.OCX, it won't work when used in-process within a 64-bit application.

 

Your best option would be probably to drop VBA, as it becomes more or less a deprecated technology, and migrate your code to a Vb.Net add-in. We have multiple resources that can help you getting started with Vb.Net Inventor add-ins:

 

http://usa.autodesk.com/adsk/servlet/index?siteID=123112&id=17324828

 

https://github.com/ADN-DevTech/Inventor-Training-Material

 

Regards,

Philippe.



Philippe Leefsma
Developer Technical Services
Autodesk Developer Network

0 Likes
Message 3 of 5

skyngu
Collaborator
Collaborator

hi,

 

is that final answer? the company just upgraded from 2012 to 2014 64bit. We lost date picker in VBA form.

 

thanks.

Autodesk Inventor Professional 2019
0 Likes
Message 4 of 5

philippe.leefsma
Alumni
Alumni

Well, as long as you stick with the VBA/64-bit combination, I'm afraid you won't be able to use those controls. I suggested workarounds in my previous reply.

 

Another suggestion would be to create a .Net dll that wraps the required controls. You should then be able to reference the .Net dll from the VBA project and use it. This would prevent migrating the whole VBA code to .Net but sounds like a cheap workaround.

 

Regards,

Philippe.



Philippe Leefsma
Developer Technical Services
Autodesk Developer Network

0 Likes
Message 5 of 5

skyngu
Collaborator
Collaborator
thanks.
Autodesk Inventor Professional 2019
0 Likes