application.onkey

  1. A

    Application OnKey ctrl shift +

    Hi all, this is my first post here, but I've been a long time learner of vba. This is the first time I've ever tried to do something like this and I haven't been able to make it work, sadly. I wanted to create a key combination that would add 1 to a cells value if it was a date. I also intend...
  2. V

    Vba Application.Onkey Press F3 not working during Cursor flashing inside Cell

    I create some code for test Press F3 on VBA Excel, the function is Application.OnKey this method excel not working during write on the Cell and Cursor Flashing inside Cell, but work fine after pressing Enter Private Sub Worksheet_SelectionChange(ByVal Target As Range) Application.OnKey...
  3. most

    Identify if a Application.OnKey is set or not

    Is it possible to identify if a Application.OnKey is set or not? if Application.OnKey."+^{g}" = "MyMacro" then msgbox "Yeah" The final goal is ONE macro which disable or enable all shortcuts.
  4. H

    Disable Backspace and Delete key on specific Sheets

    I thought this was going to be easy as Private Sub Workbook_Activate() Application.OnKey "{BACKSPACE}" Application.OnKey "{DELETE}" End Sub Private Sub Workbook_Deactivate() Application.OnKey "{BACKSPACE}" Application.OnKey "{DELETE}"End Sub Apparently its not working when...
  5. R

    VBA code for disable printscreen

    Anyone who know the code ? now i found the code follow as below but it's can printscreen :( help me please... <code style="margin: 0px; padding: 0px; font-style: inherit; font-weight: inherit; line-height: 12px;">Private Sub Workbook_Activate() Application.OnKey "{42}", "TEST" End...
  6. Dr. Demento

    User assigned keyboard shortcuts (ALT) not working

    I am having issues getting keyboard shortcuts with ALT to work and I'm wondering if I'm doing something wrong. The CTRL+SHIFT shortcuts work fine; however, in order to minimize re-assigning native CTRL shortcuts that I normally use, I've moved on to using ALT. However, they don't function at...
  7. G

    OnKey keeps running a macro although it has been reassigned to its normal use.

    Hope someone can help me with the problem mentioned in "Title". Here is what I do and what happens: 1. I assign Proc1 to Application.OnKey "{UP}", command is Application.OnKey "{UP}", "Proc1" 2. when I hit the up arrow key Proc1 is run and does what I want. 3. I reassign Application.OnKey "{UP}"...
  8. L

    when save or not save is aborted (cancel) the preset defaults are deactivated

    In the workbook open sub - functions keys, formula bar & right click are all deactivated, and in the sub below it activates them back before closing..it is good if save or not save is selected because the workbook will be closed. BUT if not and CANCEL is pressed, all those presets are gone. Do I...
  9. R

    Custom Key Strokes Not Working When Multiple Workbooks Are Open

    I customized some key strokes to launch forms in two different workbooks. For some reason, if I have multiple workbooks open, the custom key strokes no longer work, but they do work when only one workbook is open. Here's the code that I have. Both are stored in their respective ThisWorkbook...
  10. E

    OnKey question

    I have a control page with a single cell named range 'LETTER' to determine my index letter for filtered lists on another sheet. I want a shortcut to be able to change the index letter without having to leave my list sheet. To do this I have set up the following: Sub HotKeys() Application.OnKey...
  11. H

    Change the list contents in a cell, when changing the contents in another cell.

    The user fill in these cells: D5, D6, D7, D9 and D10. Other cells are locked, so with Tab, Enter or Arrows, you step through these cells. D5 and D7 are pull down lists with 10 different alternatives each. Normally you start with selecting someting in the D5 list. Depending on what you select in...
  12. J

    application.onkey doesn't work when for...next... is running

    Hello, Everyone. In my Test.xlsm Excel workbook. thisworkbook code is : sub workbook_open()Application.OnKey "{ESC}", "a" end sub the module code is : sub a()thisworkbook.close savechanges:=fasle end sub sub b()for i=1 to 1048576 sheet1.cells(i,1)=i doevents next end sub Now, here is my...
  13. S

    VBA: Not trigger an OnKey event when in column 3

    I'm using the following code to capture key press events when the specified keys on the 10-key pad are pressed. It works perfectly, with one exception. When I'm in column 3 I do not want the key presses to do anything. I want normal key and cell behavior. Here is what is happening... I...
  14. S

    Disable Specific Keyboard Shortcuts

    I found some great source code from a website (https://www.rondebruin.nl/win/s4/win012.htm) that enables you to disable the user's ability to use keyboard shortcuts. I've used the blocks of code that disable/enable all keyboard shortcuts — not just ones that are listed. I'd like to adapt the...
  15. D

    Enable Cut Copy Paste using VBA

    I used the VBA code below but need to reinstate or enable cut copy paste in Excel 2010. Thanks in advance for your assistance. <code class="vb keyword" style="white-space: nowrap; padding: 0px !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace...
  16. B

    Application.OnKey "*x" and "*v" not working on Excel 2016 for Mac

    Hi I have a workbook that I have used for several years that successfully used the following code: Application.OnKey "*x", "CutValues" 'Intercept pressing of CMD+X keys. Application.OnKey "*v", "PasteValues" 'Intercept pressing of CMD+V keys. I have updated to the atrocious Excel 2016 for Mac...
  17. C

    Application OnKey

    Hi All, I have procedure that runs a macro based on a shortcut, many shortcuts in my case -works really well. Application.OnKey "^h", "Macro1" I'm trying to implement a CheckBox in the ribbon that tells me if the shortcuts is enabled or not, in a similar manner to...
  18. S

    Application.OnKey- does not go back to Private Sub Worksheet_Change

    Hello i am using following code on Worksheet_Change event. In this Worksheet_Change code, i have used Application.OnKey and there are other procedures in this Worksheet_Change. when Application.OnKey occurs, it run the macro as said, but after completion of all those procedures in macro, it...
  19. C

    Too tricky?

    Hello, I'm struggling for a while with a generic mechanism to assign some short-cuts to methods that are implemented in classes. This is what I have so far: In a class module ("test2"): Private Sub Class_Initialize() Dim var(0 To 1) As Variant var(0) = 5 var(1) = "ThisIsAstring"...
  20. A

    Problems with Application.OnKey in Add-In files

    Hello, So basically I'm trying to create an add-in. Most of the functionality is in the ribbon but some procedures will just run better as keyboard shortcuts. I don't want the add-in to be a permanent fixture in Excel. In other words, the user will just open the add-in file directly (which...

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