PeterPan9720 Posted September 18, 2010 Share Posted September 18, 2010 Pls somebody could help me in this issue ? I created a userform for a Macro, the form contains also a command button, but every time I click on it, on mouse keyup the focus pass to the below window (dwg) with the form of course already visible. Thank you Quote Link to comment Share on other sites More sharing options...
rocheey Posted September 22, 2010 Share Posted September 22, 2010 I actually dont even have my acad on this pc, but from memory, i remember this problem .... you probably have a NON-Modal form running on top of your acad window, (to allow selections from the drawing window).. i believe you also need to drop on the acFocus control (an invisible control supplied by autocad). Select "additional Controls" from your VBA tool palette, and add this control to your VBA tool palette. Drag and drop it onto your form. Quote Link to comment Share on other sites More sharing options...
PeterPan9720 Posted September 22, 2010 Author Share Posted September 22, 2010 Thank you for your reply, Yes you are right, searching more on internet I found the acFocus control add-on, now it'ìs working fine. Thank you Quote Link to comment Share on other sites More sharing options...
Hickoz_bro Posted July 5, 2011 Share Posted July 5, 2011 (edited) Hi guys... Old thread, I know, but I'm having this problem too.. I've just created a fairly simple userform for a VBA macro, but ever time I click on the form (or one of the controls) the focus toggles from the form to AutoCAD or vice versa. I understand this is a common problem, and I've found atleast one solution in this thread: http://forums.autodesk.com/t5/Visual-Basic-Customization/Modeless-forms/m-p/343467/highlight/true#M35355 However, I tried adding the AcFocus control, but I get a warning saying "Class not registered" when I try adding the control to my form. When I added reference to the .dll file, I found a slightly differently named file in a different location, but I suspect this is because I'm on a x64 system. The file I found was: C:\Program Files (x86)\Common Files\Autodesk Shared\AcFocusCtrl16.dll Does anyone have any experience with this problem and how to solve it? Thanks in advance. Edited July 5, 2011 by Hickoz_bro Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.