PDA

View Full Version : Solved: Shortcut to macro within macro



russkie
01-17-2006, 01:14 PM
Hey ppl,
Lets say i have a userform, while it is running can i add a shortcut key to one of then buttons there that loads another userform?

thnx.

Norie
01-17-2006, 01:21 PM
Just set the Accelerator property of the command button to the appropriate letter.

russkie
01-19-2006, 08:40 AM
Hmmm... doesnt work?

I have a list box next to the command button and instead it searches through the list for the letter im punching in. I tried clicking in an area outside of the listbox where the command button is chilling out and then pressing the letter but still nuthin.. Bug on accelerator function or something is wrong?

Norie
01-19-2006, 09:00 AM
Do you have any other code?

How is the listbox being searched?

russkie
01-19-2006, 09:34 AM
The code in the Command button is to simply load another userform:
Load FunkyForm
FunkyForm Show


listbox being searched?
well theres a list of items, if you press "n" it will jump to the items starting with the letter "n" and if u keep pressing "n" it will go through all the items starting with that letter, seems like regular "listbox" procedure that ive seen in any program.

There is also a ton of code that runs when the userform with the listbox and command button is opened, maybe that is interfering somehow?

thnx for help.

russkie
01-19-2006, 09:37 AM
P.S. The letter that im inserting into the Accelerator IS underlined in the command button text, so theres no bug there, its just not picking it up when im pressing it in the form it seems.

Norie
01-19-2006, 09:38 AM
Can you attach the workbook?

russkie
01-19-2006, 09:59 AM
Its a big mofo of a workbook, its an entire inventory program which im actually considering to provide it here as an open-source program cuz i had some major help from here in developing it, but i have to find out if the program is mine and not the "companies."

Either way at the moment i cant really provide it, what would be some possible issues for it not working? And if the accelerator wont work, is there any other methods?

russkie
01-19-2006, 11:03 AM
Oh!!

Apparently u have to hold ALT and press the letter you placed in the accelerator, after messing around with it for a while io considered that it might require you to hold something else down and got.... Very Cool Thanks alot Norie!