Consulting

Page 2 of 2 FirstFirst 1 2
Results 21 to 26 of 26

Thread: VBA Code to call another VBA function when certain cells match a given criteria

  1. #21
    VBAX Regular
    Joined
    Sep 2023
    Posts
    77
    Location
    Thank you very much Arnelgp,

    I see my error now, I was calling the sub twice, when in fact I just needed to 'Show' the Userform first and only allow the sub to run once the user clicks on the Save button.

    I also see you have improved my rudimentary coding, I knew I was doing it the long way round but my VBA knowledge is still very low and I'm learning more as each day passes, I will try my best to decipher this as I need to replicate it again for the other Userform(ocean one), my goal was to get this Air one working first, then to replicate for the Ocean form.

    Once again thank you for your help, much appreciated

    Upon checking this appears to only copy the first 3 lines of data over, lines 4, 5 & 6 are blank, even if data is keyed into the Userform?

    Regards

    Richard
    Last edited by Scuba; 10-24-2023 at 01:46 AM.

  2. #22
    like i said it will only copy 3 data, since on your form, you only have 3 (distinct) location. i don't see the logic of you filling up the carton/ pallets of six location with same location (if you select 6 "PL - 08-400 Garwolin").

  3. #23
    VBAX Regular
    Joined
    Sep 2023
    Posts
    77
    Location
    HI,

    My apologies if I was not clear, the reason there are 6 is because we potentially can have multiple collections from the same location, so I do need all 6 to be accounted for.

    What do I need to change to include the other 3 lines?

  4. #24
    ok, i removed the the dictionary object from the code.
    test it now.

  5. #25
    VBAX Regular
    Joined
    Sep 2023
    Posts
    77
    Location
    All perfect my friend, many thanks for your help, much appreciated

    I will attempt to understand your coding so I can reuse elsewhere

    Thank you

    Richard.

  6. #26

Posting Permissions

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