Thread: Enter Command
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Mat P:son[_2_] Mat P:son[_2_] is offline
external usenet poster
 
Posts: 97
Default Enter Command



"Lil Pun" wrote:

I need 'Enter' to be sent because it needs to be done automatically and
not manually by keystroke. The program will place a 1 into the
specified cell (A50) and then the program needs to act as if 'Enter'
has been pushed so that the cursor then moves to cell C2, which is the
way the program is setup right now but it doesn't have a function to
'Enter' when a 1 is present in the cell.

So will your suggestion not work? Thanks!


As I said: no, it will not. But by all means, try the suggestion before you
discard it -- stranger things have happened... :o)

Frankly, I see no viable way to achieve what you're asking for -- AFAIK,
Excel does not expose the events required to listen for e.g. cell entry, and
it doesn't send change events for each character entered in a cell (not for
worksheet cells, that is). Maybe you could listen for Selection Change
events, and see if cell A50 becomes selected, but then what? Hmmm, the future
doesn't look bright...

If you're owning the code base for the ActiveX control putting "1" in cell
A50, I suggest you go in and patch the control instead, and make sure it does
what it's intended to do. That would probably be the easiest way of solving
the problem, and you would avoid trying to jump through hoops in Excel (which
seems to be neither easy nor possible?)

Cheers,
/MP

--
Lil Pun
------------------------------------------------------------------------
Lil Pun's Profile: http://www.excelforum.com/member.php...o&userid=33840
View this thread: http://www.excelforum.com/showthread...hreadid=549138