+ Reply to Thread
Results 1 to 5 of 5

Run macro everytime cell content changes

  1. #1
    Registered User
    Join Date
    01-12-2004
    Location
    NY
    Posts
    92

    Re: Code does not fire

    Hi SuitedAces,

    Instead of starting a new thread to post my own problem, I decided to reply to this particular post, since I am basically trying to re-use the same code.

    My problem is that the procedure does not fire. I have a validation list which feeds cell a43 (a named cell/range). Anyhow, based on the selection, the cursor should move to the specified cells. I am using excel 2k3. Macro security has been set at medium. I am thinking that perhaps I have a visual basic project "reference" turn off or something. Could you help? I am attaching the spreadsheet and the sheet code for reference. Rows above 43 are hidden... that's where I have place my lists.

    Please Login or Register  to view this content.
    Thanks in advance, I am sure you will be able to spot the mishap in a sec.

    Regards,
    nrage21
    Attached Files Attached Files

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    nrage21,

    Please read forum rules below. I've moved your post to it's own thread

    I've changed your ref to A47 which will trigger the event when the dropdown changed. Also when using Lcase function the dates have to be lower case (You had proper case dates). If you want a formula to trigger the event you should look at using a
    Please Login or Register  to view this content.
    event

    Please Login or Register  to view this content.
    HTH

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello nrage21,

    I also looked over your code and made a few changes. I extended your range from A43 down to tthe last cell used in column "A", otherwise your test will only work for row 43. The Application.GoTo statement is necessary if you are only selecting a cell. See the code.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello nrage21,

    I also looked over your code and made a few changes. I extended your range from A43 down to tthe last cell used in column "A", otherwise your test will only work for row 43. The Application.GoTo statement is unnecessary if you are only selecting a cell.Also, Data validation will not trigger a Worksheet_Change event, only a Worksheet_Calculate event.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

  5. #5
    Registered User
    Join Date
    01-12-2004
    Location
    NY
    Posts
    92

    Re: Thx

    Thanks so much guys for such quick responses.

    All the codes worked perfectly, and I learnt some of the criteria required when using Worksheet_Calculate and Worksheet_Change events.

    Very grateful indeed.

    Regards,
    nrage21

+ 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