AnsweredAssumed Answered

How do I select a dimension and send the pointer back to a textbox in a modeless userform?

Question asked by Tom Fosler on Jan 15, 2019
Latest reply on Jan 15, 2019 by Josh Brady

I want to simulate the custom properties dialog box in Solidworks with my own userform when a user selects a dimension and the dimension name is added to the Value/Text Expression textbox in the CP dialog box. I have this mostly complete with my code, but I want to place the cursor inside the textbox after the selected dimension name so the user can type after the dimension without having to key or mouse click to select the textbox.

 

I have a listen withevents code in my Userform (not in a class module) which listens for a dimension to be selected in the model environment and copies the displaydimension name to the textbox of my userform. I have tried setfocus, userform_activate, sellength, and none of these options have worked. This userform is modeless. If anyone has any tips on how I can do this please let me know.

Outcomes