M
mdupris
This is one of those "there's gotta be a way" situations. I have a
UserForm with objects all over it, including a multipage form, frames
within the pages and objects, including labels, within the forms and on
the pages directly. I'd like to implement a "right click for help"
routine for all the objects including labels, since some of the labels
are designed to look and feel like hyperlinks and do perform (hopefully
useful) actions for the user. The "HelpContextID" for all objects,
including labels, has been defined.
One obvious place to start is the "MouseUp()" event and use "If Button
= 2 ...". However, from there I'm stuck. With labels, the ActiveControl
object (or in my case, the
(Me.mpgMain.SelectedItem.ActiveControl.ActiveControl) object is NOT the
object whose "MouseUp()" macro is being run. Rather it's the textbox
where the cursor is sitting there blinking. Does anyone know a way to
refer to the object whose MouseUp event is being called from within the
MouseUp event itself? From there I could extract the HelpContextID
property and do a 'Shell "winhlp32.exe -N ...'
Alternately does anyone know a simpler way of having a right mouse
click bring up the context-sensitive help, equivalent to how the "F1"
key works, for all types of objects oon a UserForm? It seems this used
to a standard feature in older versions of Excel/Windows but, sigh, no
longer.
= Marchand =
UserForm with objects all over it, including a multipage form, frames
within the pages and objects, including labels, within the forms and on
the pages directly. I'd like to implement a "right click for help"
routine for all the objects including labels, since some of the labels
are designed to look and feel like hyperlinks and do perform (hopefully
useful) actions for the user. The "HelpContextID" for all objects,
including labels, has been defined.
One obvious place to start is the "MouseUp()" event and use "If Button
= 2 ...". However, from there I'm stuck. With labels, the ActiveControl
object (or in my case, the
(Me.mpgMain.SelectedItem.ActiveControl.ActiveControl) object is NOT the
object whose "MouseUp()" macro is being run. Rather it's the textbox
where the cursor is sitting there blinking. Does anyone know a way to
refer to the object whose MouseUp event is being called from within the
MouseUp event itself? From there I could extract the HelpContextID
property and do a 'Shell "winhlp32.exe -N ...'
Alternately does anyone know a simpler way of having a right mouse
click bring up the context-sensitive help, equivalent to how the "F1"
key works, for all types of objects oon a UserForm? It seems this used
to a standard feature in older versions of Excel/Windows but, sigh, no
longer.
= Marchand =