+ Reply to Thread
Results 1 to 3 of 3

Keypress event in a cell

Hybrid View

abhigreen Keypress event in a cell 03-08-2006, 12:56 PM
Guest RE: Keypress event in a cell 03-08-2006, 02:10 PM
Guest Re: Keypress event in a cell 03-08-2006, 03:40 PM
  1. #1
    Registered User
    Join Date
    03-08-2006
    Posts
    2

    Keypress event in a cell

    Hi,
    I want to know if I can capture a keypress event in a cell in some way.

    My problem is this.
    A cell say $F$1 has date value "12/12/9999". Through VBA, I have made the font for this white ("12/12/9999" is default NULL and hence should not be visible).

    However, when I do the following on $F$1
    a. I press CTRL + ; (which gives current date) or
    b. Press F2 and type a new date manually,
    I want the text in $F$1 to have a black font.
    I would like to have this before I move on to any other cell (by pressing tab) or clicking somewhere else. This precludes using Worksheet_SelectionChange or Worksheet_change event

    Please let me know how I can address this problem

    Thanks in advance
    Abhi

  2. #2
    Jim Thomlinson
    Guest

    RE: Keypress event in a cell

    Sorry but what you want to do just does not exist. There is no key press
    event such as you would find in a Textbox. The easiest way around it might be
    to add a text box depending on what you goal is...
    --
    HTH...

    Jim Thomlinson


    "abhigreen" wrote:

    >
    > Hi,
    > I want to know if I can capture a keypress event in a cell in some
    > way.
    >
    > My problem is this.
    > A cell say $F$1 has date value "12/12/9999". Through VBA, I have made
    > the font for this white ("12/12/9999" is default NULL and hence should
    > not be visible).
    >
    > However, when I do the following on $F$1
    > a. I press CTRL + ; (which gives current date) or
    > b. Press F2 and type a new date manually,
    > I want the text in $F$1 to have a black font.
    > I would like to have this before I move on to any other cell (by
    > pressing tab) or clicking somewhere else. This precludes using
    > Worksheet_SelectionChange or Worksheet_change event
    >
    > Please let me know how I can address this problem
    >
    > Thanks in advance
    > 'Abhi' (http://abhishrek.blogspot.com)
    >
    >
    > --
    > abhigreen
    > ------------------------------------------------------------------------
    > abhigreen's Profile: http://www.excelforum.com/member.php...o&userid=32265
    > View this thread: http://www.excelforum.com/showthread...hreadid=520179
    >
    >


  3. #3
    Tom Ogilvy
    Guest

    Re: Keypress event in a cell

    If you want today's date hardcoded in the cell, then why screw around. Have
    your code put in todays date when the cell is selected and turn it black.



    --
    Regards,
    Tom Ogilvy

    "abhigreen" <abhigreen.24d1ly_1141837203.6838@excelforum-nospam.com> wrote
    in message news:abhigreen.24d1ly_1141837203.6838@excelforum-nospam.com...
    >
    > Hi,
    > I want to know if I can capture a keypress event in a cell in some
    > way.
    >
    > My problem is this.
    > A cell say $F$1 has date value "12/12/9999". Through VBA, I have made
    > the font for this white ("12/12/9999" is default NULL and hence should
    > not be visible).
    >
    > However, when I do the following on $F$1
    > a. I press CTRL + ; (which gives current date) or
    > b. Press F2 and type a new date manually,
    > I want the text in $F$1 to have a black font.
    > I would like to have this before I move on to any other cell (by
    > pressing tab) or clicking somewhere else. This precludes using
    > Worksheet_SelectionChange or Worksheet_change event
    >
    > Please let me know how I can address this problem
    >
    > Thanks in advance
    > 'Abhi' (http://abhishrek.blogspot.com)
    >
    >
    > --
    > abhigreen
    > ------------------------------------------------------------------------
    > abhigreen's Profile:

    http://www.excelforum.com/member.php...o&userid=32265
    > View this thread: http://www.excelforum.com/showthread...hreadid=520179
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1