Results 1 to 5 of 5
  1. #1
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Multiple clipboards (Excel 2003-2007)

    Hi,

    A customer posed this question today. They run a macro that copies information from a current Excel file to and archive file. Its a lot of data and the macro tends to run for a while looping through many pieces of data. The macro runs in the background so the customer can continue doing other things in Excel. However they cannot copy as the macro is using the clipboard to transfer data, resulting in the macro possibly pasting the wrong info to the archive. They wanted to know if they can force Excel to use another clipboard, (either Windows clipboard or a 3rd party freeware clipboard utility) in the event that they want to work in Excel and do satndard copy paste stuff while the macro is busy in the background. If this is possible, how does one instruct Excel to use another clipboard.

    Hope this makes sense.

    TX
    Regards,
    Rudi

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Multiple clipboards (Excel 2003-2007)

    It might be possible to use DataObject from the Microsoft Forms 2.0 Library, but it would probably require extensive rewriting of the macro, since it wouldn't be possible to use the standard Excel Copy, Paste and PasteSpecial methods in the macro. Probably easier to let the macro run during coffee or lunch break...

  3. #3
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Multiple clipboards (Excel 2003-2007)

    TX. AFAIK, they were not seeking a solution on it, but just queried the idea. If they seek a solution, I will tell them that <img src=/S/whisper.gif border=0 alt=whisper width=29 height=17>'something could be done', but that it would be better to take take a coffee break and run the macro then! <img src=/S/grin.gif border=0 alt=grin width=15 height=15>
    TX

    PS: For my own sake...What is DataObject, and what does this feature have that allows multiple copy storage? If its very technical or difficult to explain, just give me a "razz" to confirm!
    Regards,
    Rudi

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Multiple clipboards (Excel 2003-2007)

    It's primarily intended to assist in copying data from userforms to the clipboard and vice versa, but it can be used outside userfoms too. Do a search for DataObject in this forum, you'll find some examples of its use.

  5. #5
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Multiple clipboards (Excel 2003-2007)

    Tx Hans,

    I did some searching and came up with these threads. For easy reference for others reading this thread, here are the links:

    See : <post#=656,472>post 656,472</post#>: Copying to the clipboard
    See : <post#=149,244>post 149,244</post#>: Copying a function to the clipboard
    And this outside link : Putting Text Into the Windows Clipboard

    Good example...Cheers!
    Regards,
    Rudi

Posting Permissions

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