Keyboard button 'event'

CalvinGraham

Board Regular
Joined
Jan 27, 2010
Messages
67
I gather there isn't a way to have an event triggered by the keyboard?

I have a system set up with graphs/tables and a search box so you could enter a value and the filters change. Of course, you could use the fitlers themselves manually but I've set up with sheet for people who don't have a clue about Excel. They should just be able to enter an office/product etc and select the chosen option from a set of cells/results.

Currently this works great except you have to hit Enter. I was really wanting an event like "Keypress" so that it could update after every letter, a bit like Google search. I could use a form but I'd rather keep it streamlined and on the worksheet
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
You can use controls on sheets as well as on forms. or you could just have a little floating form used as a control. Or use menu items.
 
Upvote 0
Hi there,

Can you not use the Selection Change event?

e.g. Office/Product value is in cell A1, option Choice is in B1:

Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    If Not Intersect(Target, Range("A1:B1")) Is Nothing Then
        doStuff
    End If
End Sub
 
Upvote 0
At the moment I've been using the selection change but that means you have to hit enter to leave the cell and invoke the event.

Interesting the thing with controls. I've always used the Forms toolset and frankly not really understood the difference between forms and controls. I found controls better because, say, if you had listbox you can right click, Format Control and there's a Control tab to assign it quickly to the worksheet. Doing a bit of reading based on here suggests that controls are more vb than excel? There's also a Mac compatibility issue I think, not much of an issue normally but my system at home could kick up a fuss if I was working from home
 
Upvote 0
Ahh, sorry Calvin - I misread the OP and thought you wanted an enter event rather than an auto update after every letter...
 
Upvote 0
Hey

I don't know if I've fully understood what you're asking for but could you set a combobox to appear when the title bar is selected? Typing in this would move you through the attached list as you typed, until a unique match is found.

The filter could be triggered by this unique match, with reference to the selected value.

Does that sound like the sort of thing you're looking for?

Rose
 
Upvote 0

Forum statistics

Threads
1,214,826
Messages
6,121,792
Members
449,048
Latest member
greyangel23

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top