+ Reply to Thread
Results 1 to 2 of 2

Clipboard gets emptied when VBA runs

  1. #1
    Registered User
    Join Date
    01-10-2014
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2007
    Posts
    77

    Clipboard gets emptied when VBA runs

    Hi,

    In my production workbook I've got code similar to the following excerpt:

    Please Login or Register  to view this content.
    So, in most cases, activating a worksheet re-protects the worksheet (UserInterfaceOnly) if it's not already protected. Note: the protection is just meant to keep the end user from shooting him/herself in the foot. There is no password on the worksheet protection; the end user can unprotect the worksheet if needed.

    I thought conditionally executing the protection would keep the clipboard intact, but this doesn't appear to be the case.

    What's irritating the end user is the inability to copy a cell value from one worksheet to another, in particular to the Money tab. When he clicks on the Money tab, the worksheet gets re-protected (if necessary), and the formulas are re-calculated. At which point the clipboard is empty, and he can't copy into the Money worksheet.

    Why does executing VBA clear the clipboard - surely Microsoft could fix this??? Is there any workaround for this issue short of re-architecting my application?

    Thanks,
    Scott

    P.S.: The reason it's coded this way is the vast bulk of the code is in a class module in an XLAM add-in. This approach was the only way I could get it to work. It's klunky but functional (and ultimately off-topic to my main question).
    Last edited by scottbass; 04-23-2014 at 12:33 AM. Reason: Added explanation for coding approach

  2. #2
    Valued Forum Contributor adyteo's Avatar
    Join Date
    01-10-2013
    Location
    Calgary
    MS-Off Ver
    Excel 2010
    Posts
    540

    Re: Clipboard gets emptied when VBA runs

    try to see whether this will help you: http://stackoverflow.com/questions/1...code-execution
    Click on the star if you think I helped you

+ 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. Prevent clipboard from emptying with macro that runs on deactivate
    By CDEG in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-04-2014, 08:52 AM
  2. Formula to account for skids of boxes being emptied then refilled
    By les0341 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-19-2014, 11:26 AM
  3. Replies: 0
    Last Post: 02-06-2013, 01:55 PM
  4. Protect clipboard data from other programs trying to use clipboard at same time?
    By chuckchuckit in forum Excel Programming / VBA / Macros
    Replies: 28
    Last Post: 09-25-2010, 07:25 AM
  5. clipboard cannot be emptied
    By rroach in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-20-2005, 04:05 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