#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 147
Default shortcuts

Hi All

I was wondering if there is a way for the ability to press a letter and for
it to call a macro on a worksheet.

Jason


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default shortcuts

Hi Jason,

See 'Run a macro from a keyboard shortcut' in Excel help.

---
Regards,
Norman


"Jason Zischke" wrote in message
...
Hi All

I was wondering if there is a way for the ability to press a letter and
for
it to call a macro on a worksheet.

Jason




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 147
Default shortcuts

Hi Norman Jones

Thanks for the quick responce, is there a way for macro to run without the
control button just the letter eg "r" runs macro1?

Jason

"Norman Jones" wrote:

Hi Jason,

See 'Run a macro from a keyboard shortcut' in Excel help.

---
Regards,
Norman


"Jason Zischke" wrote in message
...
Hi All

I was wondering if there is a way for the ability to press a letter and
for
it to call a macro on a worksheet.

Jason





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 903
Default shortcuts

How would you distinguish between entering data and a single key shortcut.

If you have your cursor on a specific empty cell you could invoke a macro using
from a Change Event macro.
http://www.mvps.org/dmcritchie/excel/event.htm
we could help you with that, but I don't see much point unless you would not be
actually entering data into the sheet.

But if you did you might check that the location is $A$1 check the 1st letter
of the entry and if it matches your choice clear the cell and invoke the other macro
or incorporate it within your change macro. (VBA is case sensitive)
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Jason Zischke" wrote in message ...
Hi Norman Jones

Thanks for the quick responce, is there a way for macro to run without the
control button just the letter eg "r" runs macro1?

Jason

"Norman Jones" wrote:

Hi Jason,

See 'Run a macro from a keyboard shortcut' in Excel help.

---
Regards,
Norman


"Jason Zischke" wrote in message
...
Hi All

I was wondering if there is a way for the ability to press a letter and
for
it to call a macro on a worksheet.

Jason







  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 147
Default shortcuts

Hey guys,

Don't worry about this one I worked it out I used :

Private Sub Worksheet_Activate()
Application.EditDirectlyInCell = False
Application.OnKey "{e}", "Module1.Macro1"
End Sub

to turn off the edit cell property and enable the shortcut and

Private Sub Worksheet_Deactivate()
Application.EditDirectlyInCell = True
End Sub

to turn on the edit cell property

Jason

"David McRitchie" wrote:

How would you distinguish between entering data and a single key shortcut.

If you have your cursor on a specific empty cell you could invoke a macro using
from a Change Event macro.
http://www.mvps.org/dmcritchie/excel/event.htm
we could help you with that, but I don't see much point unless you would not be
actually entering data into the sheet.

But if you did you might check that the location is $A$1 check the 1st letter
of the entry and if it matches your choice clear the cell and invoke the other macro
or incorporate it within your change macro. (VBA is case sensitive)
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Jason Zischke" wrote in message ...
Hi Norman Jones

Thanks for the quick responce, is there a way for macro to run without the
control button just the letter eg "r" runs macro1?

Jason

"Norman Jones" wrote:

Hi Jason,

See 'Run a macro from a keyboard shortcut' in Excel help.

---
Regards,
Norman


"Jason Zischke" wrote in message
...
Hi All

I was wondering if there is a way for the ability to press a letter and
for
it to call a macro on a worksheet.

Jason










  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 91
Default shortcuts

go to your list of macros, select the macro and then options, select
the shrtcut key that you want to use, it will end up being the ctrl key
and whatever letter you choose
Dave

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 903
Default shortcuts

Hi Jason,
Very clever. The person can always use the location bar, but I was not
expecting that you would be able to enter data directly in the cell - except for
anything that would be with a lowercase "e" which is immediately caught
on the keystroke.
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Jason Zischke" wrote in message ...
Hey guys,

Don't worry about this one I worked it out I used :

Private Sub Worksheet_Activate()
Application.EditDirectlyInCell = False
Application.OnKey "{e}", "Module1.Macro1"
End Sub

to turn off the edit cell property and enable the shortcut and

Private Sub Worksheet_Deactivate()
Application.EditDirectlyInCell = True
End Sub

to turn on the edit cell property

Jason

"David McRitchie" wrote:

How would you distinguish between entering data and a single key shortcut.

If you have your cursor on a specific empty cell you could invoke a macro using
from a Change Event macro.
http://www.mvps.org/dmcritchie/excel/event.htm
we could help you with that, but I don't see much point unless you would not be
actually entering data into the sheet.

But if you did you might check that the location is $A$1 check the 1st letter
of the entry and if it matches your choice clear the cell and invoke the other macro
or incorporate it within your change macro. (VBA is case sensitive)
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Jason Zischke" wrote in message

...
Hi Norman Jones

Thanks for the quick responce, is there a way for macro to run without the
control button just the letter eg "r" runs macro1?

Jason

"Norman Jones" wrote:

Hi Jason,

See 'Run a macro from a keyboard shortcut' in Excel help.

---
Regards,
Norman


"Jason Zischke" wrote in message
...
Hi All

I was wondering if there is a way for the ability to press a letter and
for
it to call a macro on a worksheet.

Jason










  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 903
Default shortcuts

Hi Jason,

missed something in your code upon deactivation, you will want to deactivate the
specific onkey that you assigned.

Private Sub Worksheet_Deactivate()
Application.EditDirectlyInCell = True
Application.OnKey "{e}"
End Sub


  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 903
Default shortcuts

sorry mixed up terms I meant you can always type cell content into the
"Formula Bar" in Excel if you need to begin cell content with a lowercase "e".

Gets confusing at times
Address Bar in Internet Explorer is in about the same location, but is called
Location Bar in Firefox.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Shortcuts UNK Excel Worksheet Functions 2 September 25th 09 09:30 PM
Shortcuts juanpablo Excel Discussion (Misc queries) 5 November 14th 07 07:36 PM
old shortcuts BorisS Excel Discussion (Misc queries) 0 March 20th 07 01:48 PM
shortcuts HISNA Excel Discussion (Misc queries) 7 August 31st 06 10:29 AM
Look in shortcuts. scott Excel Worksheet Functions 1 April 27th 05 11:13 PM


All times are GMT +1. The time now is 09:14 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"