+ Reply to Thread
Results 1 to 10 of 10

Combining two different actions in one event

  1. #1
    Forum Contributor
    Join Date
    02-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2019
    Posts
    677

    Exclamation Combining two different actions in one event

    Hi,

    I have following code for a (Form control button)
    When pressed, the sheet selected area is saved in a folder and outlook is opened with this file attached in PDF ready to send.....ACTION-1

    Please Login or Register  to view this content.

    I have following code which transfers data to specific cells to other sheet when cell F41 is populated. Action--2

    Please Login or Register  to view this content.
    I want to combine it in one code and allocate it to a form control button, however actions must take place in sequence given above.
    I have tried many combinations, but it does not work.

    Any help please

  2. #2
    Valued Forum Contributor
    Join Date
    11-20-2012
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2010
    Posts
    597

    Re: Combining two different actions in one event

    not sure i follow completly, let me see if i have this correct, you want to run action 1, then action 2?

    action 2 will not run since there is no code in action 1 that changes the value of $F$41 which is what the target address is.

    can you please clarify?

  3. #3
    Forum Contributor
    Join Date
    02-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2019
    Posts
    677

    Re: Combining two different actions in one event

    Yes you are right.

    For action 2 What I do is type 'YES' in F41. This triggers transfer data to other sheet.

    I want to modify code for Action 2 where 'YES' populated automatically in F41 to trigger action.

    So action 1 is OK
    Action 2 needs bit modification
    Thanks
    Regards

  4. #4
    Valued Forum Contributor
    Join Date
    11-20-2012
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2010
    Posts
    597

    Re: Combining two different actions in one event

    thats easy at the end of action one code

    Please Login or Register  to view this content.
    you don't need to change action 2 code at all (i think)

  5. #5
    Forum Contributor
    Join Date
    02-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2019
    Posts
    677

    Re: Combining two different actions in one event

    Thanks mate. But can you combine the two codes in to one. I could not do it

  6. #6
    Forum Contributor
    Join Date
    02-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2019
    Posts
    677

    Re: Combining two different actions in one event

    I have combined it and I need help.

    Please Login or Register  to view this content.

  7. #7
    Valued Forum Contributor
    Join Date
    11-20-2012
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2010
    Posts
    597

    Re: Combining two different actions in one event

    not quite, since the action 2 macro is sheet code, it will run automatically when you update cell F41

    Please Login or Register  to view this content.

  8. #8
    Forum Contributor
    Join Date
    02-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2019
    Posts
    677

    Re: Combining two different actions in one event

    OK Mate. I will try.
    thanks

  9. #9
    Forum Contributor
    Join Date
    02-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2019
    Posts
    677

    Re: Combining two different actions in one event

    Hi Mate,
    It worked well.
    I was making a mistake and now modified to read as follows

    Please Login or Register  to view this content.
    Many thanks again
    Regards

  10. #10
    Valued Forum Contributor
    Join Date
    11-20-2012
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2010
    Posts
    597

    Re: Combining two different actions in one event

    nice, yeah, I forgot that it was on a different sheet good catch, cheers!

+ 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