+ Reply to Thread
Results 1 to 11 of 11

Is it possible to run a macro while I am typing in a cell

  1. #1
    Registered User
    Join Date
    04-06-2016
    Location
    kolkata
    MS-Off Ver
    2010
    Posts
    12

    Is it possible to run a macro while I am typing in a cell

    Is it possible to run a macro while I am typing in a cell ,

    Suppose I am typing in A1,I am typing the word Sourav,and whenever this string has 6 characters at that very moment I want to run a macro.

    I did it with worksheet_change event,but in that case I have to type an enter or tab to get away from A1,and then that macro will run


    So what if I want to do this without typing enter or tab,means the macro will run while I am still in A1

    Is it possible.

    Thank You

    Sourav Bhattacharya

  2. #2
    Forum Expert
    Join Date
    04-01-2013
    Location
    East Auckland
    MS-Off Ver
    Excel 365
    Posts
    1,343

    Re: Is it possible to run a macro while I am typing in a cell

    What do you want that macro to do? Is this some sort of spell check or something?

  3. #3
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Is it possible to run a macro while I am typing in a cell

    Simply you can't

    Try this link
    http://stackoverflow.com/questions/2...editing-a-cell
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  4. #4
    Registered User
    Join Date
    12-03-2012
    Location
    Charlotte, NC
    MS-Off Ver
    Excel 2010, 2013, 2016
    Posts
    41

    Re: Is it possible to run a macro while I am typing in a cell

    I don't believe that's possible....

    However, you can use KeyPress, KeyDown or KeyUp events in a userform that can execute code when keys are pressed.

    I've used this to prevent user's from typing in characters in criteria textboxes for SQL.... i.e. Prevent users from using "%", "*" etc....
    Using Excel 2010, 2013 & 2016 | Windows 7 | 64 Bit

  5. #5
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Is it possible to run a macro while I am typing in a cell

    As I have read about this it can be done using API
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    04-06-2016
    Location
    kolkata
    MS-Off Ver
    2010
    Posts
    12

    Re: Is it possible to run a macro while I am typing in a cell

    Sorry for being late,what I wanted to do is find some data using a macro when the number of characters in the cell reaches 6,thank for the help

    This forum is really helpful.

  7. #7
    Registered User
    Join Date
    04-06-2016
    Location
    kolkata
    MS-Off Ver
    2010
    Posts
    12

    Re: Is it possible to run a macro while I am typing in a cell

    My god,this is what I needed,however the code is little bit complex,anybody know any book to learn api coding,

    But thank you so so so very much for spending your valuable time on this,

    I am very grateful for this.


    Thank you

    Sourav Bhattacharya

  8. #8
    Registered User
    Join Date
    04-06-2016
    Location
    kolkata
    MS-Off Ver
    2010
    Posts
    12

    Re: Is it possible to run a macro while I am typing in a cell

    However even if I don't understand all the code,I have managed to run the macro on my criteria,how amazing is this,again thank you so very much


    Sourav Bhattacharya

  9. #9
    Registered User
    Join Date
    04-06-2016
    Location
    kolkata
    MS-Off Ver
    2010
    Posts
    12

    Re: Is it possible to run a macro while I am typing in a cell

    how do you guys got so good in excel coding,is it just experience, or some deeply buried knowledge treasure in internet.

    Please enlighten me

    But thanks again,this is really astonishing for me..

    Sourav

  10. #10
    Registered User
    Join Date
    12-03-2012
    Location
    Charlotte, NC
    MS-Off Ver
    Excel 2010, 2013, 2016
    Posts
    41

    Re: Is it possible to run a macro while I am typing in a cell

    YasserKhalil,

    Thanks for the example.

  11. #11
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Is it possible to run a macro while I am typing in a cell

    You're welcome. Glad I can offer some help

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 2
    Last Post: 07-13-2014, 04:57 AM
  2. [SOLVED] VBA: How to make macro for typing specific (long) formula in cell ?
    By ChristopherH in forum Excel General
    Replies: 4
    Last Post: 03-24-2014, 12:59 PM
  3. [SOLVED] Use a cell name to look at a tab rather than typing in the tab name
    By s09524 in forum Excel Formulas & Functions
    Replies: 19
    Last Post: 11-25-2013, 09:01 AM
  4. Fill cell automatic when typing from a list tied to the cell
    By RayBekeris in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-17-2012, 05:09 PM
  5. Allowing macro to run while typing words into cells
    By Cellar Webs in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-03-2007, 02:20 PM
  6. Replies: 1
    Last Post: 07-20-2006, 03:05 PM
  7. [SOLVED] I need help writing a macro that will correct typing errors?
    By notthemacroman in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-26-2006, 08:46 PM

Tags for this Thread

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