+ Reply to Thread
Results 1 to 10 of 10

Dropdown List Macro activate

  1. #1
    Registered User
    Join Date
    10-24-2007
    Location
    Greeley, CO
    Posts
    53

    Dropdown List Macro activate

    Hello,
    I am really close to doing what I need I have just run into a little problem. I have code to do what I need to do currently but it only works for one cell. If I try to get it to copy down through a range it loops endlessly back and forth between two values. I am sure that there is an easy way of accomplishing this. I would appreciate anyones help or suggstions. Thanks.

    Here is the code that I am using on the worksheet
    Please Login or Register  to view this content.
    Now I know that the target.address is set to D2. What I would like to do is the target.address range for colum d starting with D2 going down.

    I also have a module that I use to call the macros it is as follows
    Please Login or Register  to view this content.
    Now the same thing happens here I know. They way I have it coded will always perform the calculation in f2. What I am trying to accomplish is for every row I want to be able to select the value from the drop down list in D column and perform the caclulation in the corresponding f column of the same row.


    I will also attach a copy of the file so people can look at what it is exactly that I am trying to accomplish.

    Thanks again for the help

    Bob

  2. #2
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229
    If you put
    Please Login or Register  to view this content.
    around the change routine, you will avoid cascading Change events.

  3. #3
    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
    Maybe

    Please Login or Register  to view this content.
    VBA Noob
    Last edited by VBA Noob; 12-04-2007 at 04:13 PM.
    _________________________________________


    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 !!!

  4. #4
    Registered User
    Join Date
    10-24-2007
    Location
    Greeley, CO
    Posts
    53
    Sorry forgot to attach the file.
    Attached Files Attached Files

  5. #5
    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
    Did my code help

    VBA Noob

  6. #6
    Registered User
    Join Date
    10-24-2007
    Location
    Greeley, CO
    Posts
    53
    It helped some but if I put your code in exactly nothing would happen when I would select bulk, NNB Bulk, Cartons, or Coors. I used a varient of yours and mine and I can get the drop down to refrence the macro but I still can't figure out how to make the macro perform the calculation and place it in the right location.

    Here is what I have done.
    Please Login or Register  to view this content.
    Also tried this in Macro 1 but it puts the value in all the F cells for the entire sheet. I know that is what I am telling it to do.
    Please Login or Register  to view this content.
    Thanks again for you help it is greatly appreciated.
    Bob

  7. #7
    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
    Your Enableevents must be set to false

    Try the attached file

    VBA Noob
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    10-24-2007
    Location
    Greeley, CO
    Posts
    53
    I figured it out. Thanks VBA Noob for your help.


    Worksheet code
    Please Login or Register  to view this content.

    Module1 code
    Please Login or Register  to view this content.
    Thanks again for all the help
    Bob

  9. #9
    Registered User
    Join Date
    10-24-2007
    Location
    Greeley, CO
    Posts
    53
    Thanks VBA Noob your code works great. mine was working sometimes but not all the time. Thanks again for your help.

    Bob

  10. #10
    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
    Your welcome

    VBA Noob

+ 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