+ Reply to Thread
Results 1 to 6 of 6

How can I execute a 'macro1' once an entry is made in a cell and enter is pressed?

  1. #1
    Forum Contributor rkjudy's Avatar
    Join Date
    03-31-2009
    Location
    Longview, TX
    MS-Off Ver
    MS Office 2010
    Posts
    239

    How can I execute a 'macro1' once an entry is made in a cell and enter is pressed?

    When I open this particular Sheet2, the focus is on cell B10. The value in B10 is initially $0.00. The user then changes this to another dollar value. I need to execute a macro whenever this amount on cell B10 is changed by the user. The macro takes information from newly calculated information (as a result of the change in cell B10) on Sheet1 and places this information on Sheet2. Any suggestions?
    Last edited by rkjudy; 08-10-2012 at 06:10 PM.

  2. #2
    Registered User
    Join Date
    07-23-2012
    Location
    New York
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: How can I execute a 'macro1' once an entry is made in a cell and enter is pressed?

    On the code for Sheet2 enter in the following:

    Please Login or Register  to view this content.
    Last edited by Cutter; 08-08-2012 at 05:58 PM. Reason: Added code tags

  3. #3
    Forum Contributor rkjudy's Avatar
    Join Date
    03-31-2009
    Location
    Longview, TX
    MS-Off Ver
    MS Office 2010
    Posts
    239

    Re: How can I execute a 'macro1' once an entry is made in a cell and enter is pressed?

    I'm getting a Compile error: Syntex error. Here is my code. This is placed as code for Sheet2. The workbook opens to Sheet1. I run a macro (GoToPriceWorkup) to go to Sheet2. The macro returns to Sheet1, performs calcs, then goes to Sheet2 and fills some other cells.

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    07-23-2012
    Location
    New York
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: How can I execute a 'macro1' once an entry is made in a cell and enter is pressed?

    Sorry I should have clarified better. Take of the quotes so it looks like this:

    Please Login or Register  to view this content.
    If that does not work send me the GoToPriceWorkup code
    Last edited by Cutter; 08-09-2012 at 12:11 PM. Reason: Added code tags

  5. #5
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: How can I execute a 'macro1' once an entry is made in a cell and enter is pressed?

    @ FrankD10

    Welcome to the forum.

    Please notice that code tags have been added to your post(s). The forum rules require them so please keep that in mind and add them yourself whenever showing code in any of your future posts. To see instructions for applying them, click on the Forum Rules button at top of the page and read Rule #3.
    Thanks.

  6. #6
    Forum Contributor rkjudy's Avatar
    Join Date
    03-31-2009
    Location
    Longview, TX
    MS-Off Ver
    MS Office 2010
    Posts
    239

    Re: How can I execute a 'macro1' once an entry is made in a cell and enter is pressed?

    Thanks much. I entered the code as you suggested and it works PERFECT. However, now when I execute another macro that clears and resets the sheet, I get a Run-time error '1004': "Application-defined or object-defined error".

    Please Login or Register  to view this content.
    The code stops and presents the error on this line:
    Please Login or Register  to view this content.
    The AllDebits is a named range.

    Before I added your suggestion above, this code executely perfectly and I did not get the error. Only after adding your code to sheet2 (which worked perfectly) did I get this error. Any other suggestions?

+ 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