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

Is it possible to create a macro so that when the enter button i
pressed, the workbook is either saved, or saved then closed

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 57
Default on press

Fraggs,

You can trap any key with OnKey

Application.OnKey "~", "EnterProc"

Now whenever Enter is pressed, it runs EnterProc

Sub EnterProc()
MsgBox "Hello, dere. This is EnterProc"
End Sub

You sure you want to use the Enter key for this???
--
Earl Kiosterud
mvpearl omitthisword at verizon period net
-------------------------------------------

"Fraggs " wrote in message
...
Is it possible to create a macro so that when the enter button is
pressed, the workbook is either saved, or saved then closed?


---
Message posted from http://www.ExcelForum.com/



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
when i press TAB key in an excel sheet nothing happens? max power Excel Discussion (Misc queries) 3 March 24th 08 09:49 PM
Information hidden when I press F2 Gazzr Excel Discussion (Misc queries) 1 April 20th 06 02:24 PM
When I Press the Enter Key Nothing happens. bigev Excel Discussion (Misc queries) 1 March 1st 06 03:05 PM
on press detection Fraggs[_17_] Excel Programming 1 June 7th 04 03:26 PM
test for key press Robert Chapman Excel Programming 6 October 6th 03 05:31 PM


All times are GMT +1. The time now is 03:43 PM.

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

About Us

"It's about Microsoft Excel"