Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default How to do the following by pressing the down arrow or up arrow key?

Hi,


I wrote a macro to do the following thing:

I move from B1 to B100 and for each stop over a B cell, an input box
prompts me to key in a number to be the value in the current B cell. I
press enter to move to the next cell. Then, an input box popps up
asking me for a number again. The process goes on until B100.

Now, I want to do a slightly different thing: I want to move up and
down the B cells casually and easily by pressing the down arrow or up
arrow key without pressing the enter key at all. Is it possible to do
that? Let me give you an example. Suppose, I am on B3. An input box
shows up and asks me for a number. I enter 3. I want 3 to be B3's
value, and I hope to move up one cell by pressing the up arrow key or
down one cell by pressing the down arrow key without using the enter
key at all. Is doing that possible? Thanks.

David

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default How to do the following by pressing the down arrow or up arrow key?

Look in Excel help at OnKey and sendkey. Define uparror to send a return
and move up one cell, down arror to send a return and move down one cell.

Untested suggestion, but the only thing I can think of.

--
Regards,
Tom Ogilvy


"cyberdude" wrote in message
oups.com...
Hi,


I wrote a macro to do the following thing:

I move from B1 to B100 and for each stop over a B cell, an input box
prompts me to key in a number to be the value in the current B cell. I
press enter to move to the next cell. Then, an input box popps up
asking me for a number again. The process goes on until B100.

Now, I want to do a slightly different thing: I want to move up and
down the B cells casually and easily by pressing the down arrow or up
arrow key without pressing the enter key at all. Is it possible to do
that? Let me give you an example. Suppose, I am on B3. An input box
shows up and asks me for a number. I enter 3. I want 3 to be B3's
value, and I hope to move up one cell by pressing the up arrow key or
down one cell by pressing the down arrow key without using the enter
key at all. Is doing that possible? Thanks.

David



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
in excel, pressing shift+ctrl+arrow no longer works? any idea why excel user Excel Worksheet Functions 1 August 12th 09 03:04 PM
Excel 2007 - Macro (VB) code for arrow down & arrow up Grindy Excel Discussion (Misc queries) 5 January 28th 09 04:30 AM
Using end-arrow down or end-arrow up in a macro Richard Champlin Excel Discussion (Misc queries) 2 September 20th 07 01:12 AM
why dont shift+arrow or ctrl+arrow work in 2007 Naguib Excel Discussion (Misc queries) 1 July 24th 07 04:40 PM
How to do the following by pressing the down arrow or up arrow key? cyberdude Excel Discussion (Misc queries) 4 December 14th 05 01:29 PM


All times are GMT +1. The time now is 04:14 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"