Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to cause userform to display
Hi all, I know how to make a userform display when a user
selects new from a template, but how do I cause a userform to display when a certain sequence of keys is pressed...Ctrl X for example? Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to cause userform to display
Jim,
You can use the OnKey to assign a macro to key stroke combination, and then have that macro show the form. For example, Sub SetKey() Application.OnKey "^X","MacroName" End Sub Sub MacroName() UserForm1.Show End Sub -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Jim" wrote in message ... Hi all, I know how to make a userform display when a user selects new from a template, but how do I cause a userform to display when a certain sequence of keys is pressed...Ctrl X for example? Thanks |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to cause userform to display
Insert new module.
Write procedure which shows userform. Sub ShowMyForm MyForm.Show End Sub Tools - Macro - Macros Select macro ShowMyForm Click button Options.. Put there keyboard shortcut... -----Original Message----- Hi all, I know how to make a userform display when a user selects new from a template, but how do I cause a userform to display when a certain sequence of keys is pressed...Ctrl X for example? Thanks . |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to cause userform to display
Thanks Chip, it works perfectly.
-----Original Message----- Jim, You can use the OnKey to assign a macro to key stroke combination, and then have that macro show the form. For example, Sub SetKey() Application.OnKey "^X","MacroName" End Sub Sub MacroName() UserForm1.Show End Sub -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Jim" wrote in message ... Hi all, I know how to make a userform display when a user selects new from a template, but how do I cause a userform to display when a certain sequence of keys is pressed...Ctrl X for example? Thanks . |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to cause userform to display
Jim, I am not too sure that your understanding of a userform are the same a mine. The userform that I use is part of the VBE scenario. Notwithstanding that, if you go to Tools in the Excel menu sheet an select Macro from the resulting dropdown menu, select 'Record ne macro..' there is a box that will alow you to add a shortcut key t activate the macro. If you already have an existing Macro then instead of 'Record Ne Macro' select the Macro itself and then Options. The same shortcut ke facility is available from the reulting dialogue box. HTH : ----------------------------------------------- ~~ Message posted from http://www.ExcelTip.com ~~View and post usenet messages directly from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Display a Chart in a userform | Charts and Charting in Excel | |||
display userform at certain time | Excel Worksheet Functions | |||
display userform | Excel Discussion (Misc queries) | |||
display status bar value in excel userform? | Excel Discussion (Misc queries) | |||
UserForm - display text message then run code | Excel Programming |