Message 1 of 3
SetFocus back to control on my form after user selection in Acad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have this code block in ThisDrawing module inside
AcadDocument_SelectionChanged event procedure.
the event runs fine but I'd like to send the focus back to the form (modeless form with AcFocusCtrl1)
In the code I get intellesence as I should and this code block is evalueated without error... but the focus doesn't go back to the control on the form.
What am I doing wrong?
Option Explicit
Private objIDE As VBIDE.VBE
''''''
Set objIDE = Application.VBE
objIDE.ActiveWindow.SetFocus
objIDE.Windows.Item("frmContNum").SetFocus
frmContNum.LViewPCNData.SetFocus
AcadDocument_SelectionChanged event procedure.
the event runs fine but I'd like to send the focus back to the form (modeless form with AcFocusCtrl1)
In the code I get intellesence as I should and this code block is evalueated without error... but the focus doesn't go back to the control on the form.
What am I doing wrong?
Option Explicit
Private objIDE As VBIDE.VBE
''''''
Set objIDE = Application.VBE
objIDE.ActiveWindow.SetFocus
objIDE.Windows.Item("frmContNum").SetFocus
frmContNum.LViewPCNData.SetFocus