Hi and thanks for the reply. I'm less concerned about the keyboard
specifically, and more interested to see if there is a way to check if a
sheet (any sheet) has focus. One thing I thought of is to check the value of
ActiveSheet, however this doesn't always work because ActiveSheet has a value
even when the Options Dialog is open (or any other dialog for that matter).
It also has a value while editing within a cell. Do you know if there is a
way to accomplish the following:
If ActiveSheet.HasFocus = True Then
[Do Something]
End If
Thanks for the help!
Matt
FSt1 said:
hi
the keyboard is just another input device like the mouse. or the bar coded
reader.
how do you determine if the mouse has "focus"?? well...you don't know unitl
a button(key) is pressed then the input device has "focus". if the keyboard
has "focuss" then we may be talking about "keyboard shortcuts" which does
cause code to run i.e. do something. I think that is why we don't seem to
have "isKeyboardFocused" property or a "ismousefocused" property.
having been confused by your post, could you explain further just what your
are trying to accomplish?
regards
FSt1
:
What I'm trying to accomplish is essentially the following:
If ActiveSheet.IsKeyboardFocused = True Then
[Do Something]
End If
Unfortunately, ActiveSheet/Worksheet does not have the IsKeyboardFocused
property (I pulled this property from a Button control as a functional
example).
Is there a way to accomplish this If statement?
Thanks,
Matt