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).
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.
hi,
is that final answer? the company just upgraded from 2012 to 2014 64bit. We lost date picker in VBA form.
thanks.
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.