![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: May 2002
Posts: 2
|
I want to Re-Asign a shortcut key function.
For example... I want to change Ctrl+V = Paste to Ctrl+V = PasteSpecial-Values Is this possible ? if yes how. Thanx in advance |
|
|
|
|
|
#2 |
|
New Member
Join Date: Apr 2002
Posts: 41
|
Sam
Try Application.Onkey. Paste or type this code in a module - I've added comments re which to run. - Open VBE Alt + {F11} - From menue Insert/Module - Put this code in the module Sub setKey() 'Run this to set the shortcut Application.OnKey "^v", "PasteSp" End Sub Sub Reset() 'Run this to return the shortcut to original Application.OnKey "^v" End Sub Sub PasteSp() 'This is the routine that runs to the shortcut ActiveCell.PasteSpecial Paste:=xlPasteValues End Sub - Run the setKey routine -Try it out in the workbook Any help? Regards Robb__ |
|
|
|
|
|
#3 |
|
New Member
Join Date: May 2002
Posts: 2
|
Hey Robb,
Excellent Solution. Both the Set and Reset Subs worked like a charm. Thanks a million Sam PS I you have proplems coying code from this page to Clipboard, copy from Menu:View>Page Source |
|
|
|
|
|
#4 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Auckland, New Zealand
Posts: 4,209
|
Not to take away from Robbs solution, add
also set cutcopymode to false to clear the clipboard and get rid of the highlighted selection...otherwise there is the possibilty of entering data twice if you use enter straight after. EG> Sub PasteSp() 'This is the routine that runs to the shortcut ActiveCell.PasteSpecial Paste:=xlPasteValues Application.CutCopyMode = False End Sub |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|