![]() |
Calling Excel shortcuts from VBA
Hi,
I am trying to automate the following two excel shortcuts using VBA. I know I can use commandbar and commandcontrol to call excel menus but I can not find the submenus these shortcuts belong to. 1. Ctrl + [ -- cursor goes to the precedent cell 2. F5 + Enter -- cursor goes to the original cell Also, is it possible to call an excel shortcut from VBA? I know that one can call a worksheet function from VBA (For example, Application.WorksheetFunction.Fact(5) ). But is there way to call a shortcut, say Ctrl + C from VBA? Thanks, MG. Submitted via EggHeadCafe - Software Developer Portal of Choice Parallel Programming in C# 4.0: A Short Synopsis http://www.eggheadcafe.com/tutorials...ming-in-c.aspx |
Calling Excel shortcuts from VBA
Just make the VBA do what the shortcut does.
CNTRL+[ can be implemented by: Selection.DirectPrecedents.Select -- Gary''s Student - gsnu201003 "M G" wrote: Hi, I am trying to automate the following two excel shortcuts using VBA. I know I can use commandbar and commandcontrol to call excel menus but I can not find the submenus these shortcuts belong to. 1. Ctrl + [ -- cursor goes to the precedent cell 2. F5 + Enter -- cursor goes to the original cell Also, is it possible to call an excel shortcut from VBA? I know that one can call a worksheet function from VBA (For example, Application.WorksheetFunction.Fact(5) ). But is there way to call a shortcut, say Ctrl + C from VBA? Thanks, MG. Submitted via EggHeadCafe - Software Developer Portal of Choice Parallel Programming in C# 4.0: A Short Synopsis http://www.eggheadcafe.com/tutorials...ming-in-c.aspx . |
All times are GMT +1. The time now is 06:07 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com