TextBox not working in VBA

TextBox not working in VBA

Jedimaster
Collaborator Collaborator
1,556 Views
3 Replies
Message 1 of 4

TextBox not working in VBA

Jedimaster
Collaborator
Collaborator

I am working in AutoCAD 2010, Windows 7, 64 Bit. I can not edit Userform Textboxes. I can edit in 2007 VBA but not 2010. I read some things about

AcFocusCtrl control and AcFocusCtrl.dll. I can not locate on computer. 

0 Likes
Accepted solutions (1)
1,557 Views
3 Replies
Replies (3)
Message 2 of 4

norman.yuan
Mentor
Mentor
Accepted solution

It sounds you use a modeless UserForm, for which you need to use AcFocusCtrl in order for the controls on the form to maintain focus.

 

However, with 64bit AutoCAD of older version (prior to Acad2014), the VBA is still 32-bit and runnas external process synced with AutoCAD, there are quite some reports that modeless userform works not as expected, even with AcFocusCtrl beign used.

 

So, if possible, try avoid to show userform as modeless.

 

Anyway, to get AcFocusCtrl, you righ-click UserForm's toolbox and select "Additional controls...", you then should be able to see "AcFocusCtrl" in the "Additional Controls" dialog box, usually the first item. Check the leading check box and click "OK".

 

 

Norman Yuan

Drive CAD With Code

EESignature

Message 3 of 4

Jedimaster
Collaborator
Collaborator

Worked once I found it. Thank you very much.

0 Likes
Message 4 of 4

Jedimaster
Collaborator
Collaborator

I found out this morning that this may not be a AutoCAD VBA issue.This a recent issue because the forms were working okay. When I added the focus control it caused errors on other machines. I found this may actually be rooted in a Windows Update issue.

 

VBA Form Controls stop working after December 2014 Updates

 

http://blogs.technet.com/b/the_microsoft_excel_support_team_blog/archive/2014/12/11/forms-controls-s...

0 Likes