+ Reply to Thread
Results 1 to 13 of 13

Message box to open when copy/paste procedure is used in the worksheet and run a macro

  1. #1
    Forum Expert PaulM100's Avatar
    Join Date
    10-09-2017
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    2,108

    Message box to open when copy/paste procedure is used in the worksheet and run a macro

    HI,

    Is it possible to add a message box code that will automatically start after the copy/paste procedure has been used in a worksheet and run a macro? This will be manually done, not via VBA. The macro to ask say something like "Calculations finished, Copy/Paste procedure as well! Do you want to run?"

    Thanks,
    Paul
    Last edited by PaulM100; 07-03-2018 at 09:01 AM.

  2. #2
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    14,964

    Re: Message box to open when copy/paste procedure is used in the worksheet and run a macro

    https://stackoverflow.com/questions/...in-a-worksheet
    Good Luck...
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the [★ Add Reputation] to left of post window...
    Also....Add a comment if you like!!!!
    And remember...Mark Thread as Solved...
    Excel Forum Rocks!!!

  3. #3
    Forum Expert PaulM100's Avatar
    Join Date
    10-09-2017
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    2,108

    Re: Message box to open when copy/paste procedure is used in the worksheet and run a macro

    Hi sintek, thank you for that link. Unfortunately, after adding the code in the worksheet module and a simple message box line for testing purposes, I've tried to paste as values something into the worksheet using Alt+Ctrl+V and the popup message didn't show. Any thought?

  4. #4
    Forum Expert PaulM100's Avatar
    Join Date
    10-09-2017
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    2,108

    Re: Message box to open when copy/paste procedure is used in the worksheet and run a macro

    Disregard my last post. I was testing the wrong sheet. But I have another question. The Worksheet_Change should check the second pasting, as I run a code before that opens one file and paste data from it to this sheet and does some other pasting in different sheets. The something is changed manually and finally copy/paste is used. This is a second copy-paste in this sheet. How can I change it to reflect the second one?

  5. #5
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    14,964

    Re: Message box to open when copy/paste procedure is used in the worksheet and run a macro

    Try...
    Please Login or Register  to view this content.
    Last edited by Sintek; 07-03-2018 at 11:16 AM.

  6. #6
    Forum Expert PaulM100's Avatar
    Join Date
    10-09-2017
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    2,108

    Re: Message box to open when copy/paste procedure is used in the worksheet and run a macro

    Doing so returns a run-time error - 2147467259 Method of ComandBarComboBox failed on the line below:
    Please Login or Register  to view this content.
    when first copy/paste is done.

  7. #7
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    14,964

    Re: Message box to open when copy/paste procedure is used in the worksheet and run a macro

    as I run a code before that opens one file and paste data from it to this sheet and does some other pasting in different sheets.
    What is the code...
    Then something is changed manually and finally copy/paste is used
    Is this paste a manual copy/paste?

  8. #8
    Forum Expert PaulM100's Avatar
    Join Date
    10-09-2017
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    2,108

    Re: Message box to open when copy/paste procedure is used in the worksheet and run a macro

    First one is done via VBA, the second one is manual. I need to trigger the event after the manual one.

  9. #9
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    14,964

    Re: Message box to open when copy/paste procedure is used in the worksheet and run a macro

    As per post 7...what is your code that copies/pastes...

  10. #10
    Forum Expert PaulM100's Avatar
    Join Date
    10-09-2017
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    2,108

    Re: Message box to open when copy/paste procedure is used in the worksheet and run a macro

    The one below is the code. Is the one that you helped me some time ago:

    Please Login or Register  to view this content.

  11. #11
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    14,964

    Re: Message box to open when copy/paste procedure is used in the worksheet and run a macro

    Hi PaulM100

    Wish i could be of more help...Difficult without creating your actual scenario...
    Try this and let me know...
    Please Login or Register  to view this content.

  12. #12
    Forum Expert PaulM100's Avatar
    Join Date
    10-09-2017
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    2,108

    Re: Message box to open when copy/paste procedure is used in the worksheet and run a macro

    Unfortunately it doesn't work, but I managed to find a workaround by triggering the worksheet event after a specific amount of time. Thank you anyway.

  13. #13
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    14,964

    Re: Message box to open when copy/paste procedure is used in the worksheet and run a macro

    Glad you solved...Sorry I could not be much help...
    Tx for rep +

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 8
    Last Post: 11-25-2015, 08:14 PM
  2. Macro - Command "Paste" -> Open message box
    By AndyVirus in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-19-2015, 03:01 AM
  3. Open Multiple Files, Copy Worksheet, Paste in to Specific Tab in Original Workbook
    By freybe06 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-30-2013, 10:27 AM
  4. Copy, open file, and paste macro
    By Ohaern in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-13-2011, 11:45 AM
  5. Open file into excel, copy certain cells, and paste them into a new worksheet.
    By dg980 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-12-2011, 10:41 AM
  6. Copy and Paste Macro that pastes to the next open row
    By newatmacros in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-22-2010, 05:45 PM

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