Note: This is a repost of something I posted on the sister forums that hasn't gotten any replys.
What I'm looking for is a more simple way to Enable/Disable Edit Menu Items based on Active Control behavior.
Behavior (basically, I might miss something):
I'm handling the event of the Edit Menu Dropdown and I can check the active control (Me.ActiveControl).
Now I hope I'm missing something, but it seems I would have to do a Select (or If...Then) to find out what Type the ActiveControl is and then write code Enable/Disable these MenuItems for each type of control.
I can do that, but I was hoping there was an easier way to handle this more generically that I'm missing. Any ideas?
What I'm looking for is a more simple way to Enable/Disable Edit Menu Items based on Active Control behavior.
Behavior (basically, I might miss something):
- Copy/Cut/Delete - Only enabled when text is selected (SelectedText.Length is the way I normally go about it)
- Paste - Only enabled if text is on the clipboard
I'm handling the event of the Edit Menu Dropdown and I can check the active control (Me.ActiveControl).
Now I hope I'm missing something, but it seems I would have to do a Select (or If...Then) to find out what Type the ActiveControl is and then write code Enable/Disable these MenuItems for each type of control.
I can do that, but I was hoping there was an easier way to handle this more generically that I'm missing. Any ideas?