ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Window Class of UserForm controls (https://www.excelbanter.com/excel-programming/379489-re-window-class-userform-controls.html)

Peter T

Window Class of UserForm controls
 
You have definitive answers concerning hWnd of the active control but even
were you to obtain that I don't see how it would help with your context
sensitive help.

There is a built in method as Nick mentioned but you can simulate your own
with something like

Private Sub CommandButton1_KeyDown(ByVal KeyCode As _
MSForms.ReturnInteger, ByVal Shift As Integer)
If KeyCode = vbKeyF1 Then
Call myHelp(CommandButton1.HelpContextID)
End If

End Sub

myHelp being a routine to call the help API if using html help

could do something similar with mousemove if your chm provides popups

There is also ' ActiveControl ' if needs.

Regards,
Peter T


"Martin" wrote in message
...
Can anyone tell me the API Window Class of controls in a userform? Or,

even
better, point me to a definitive list of the window classes in MS Office?

I'm trying to find a way to to identify the hWnd of the active control

(not
easy in VBA) so I can use context sensitive help.





All times are GMT +1. The time now is 09:57 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com