Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 238
Default Macro to restore previous content of clipboard

I have a macro that executes several copy and pastes. The problem, If I copy something then run the macro, I have lost the original copied item. ;{

I would like to enter the macro, store the clipboard content and later exit the macro restoring the clipboard. Any ideas? Thanks. I am using excel 2000.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 238
Default Macro to restore previous content of clipboard

What I do now is to clear the clipboard before exiting macro with this
Application.CutCopyMode = False
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 587
Default Macro to restore previous content of clipboard

hi Fan924,

'add a reference to the Microsoft Forms 2.0 Object Library

Sub Macro1()
Dim DataObj As New MSForms.DataObject
Dim S As String
DataObj.GetFromClipboard
S = DataObj.GetText
Debug.Print S
End Sub

isabelle

Le 2013-03-05 21:32, Fan924 a écrit :
What I do now is to clear the clipboard before exiting macro with this
Application.CutCopyMode = False

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 238
Default Macro to restore previous content of clipboard

isabelle, Thanks
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I restore previous content before a save? cls1990 Excel Discussion (Misc queries) 4 November 30th 09 09:05 PM
clipboard - backup and restore softie Excel Programming 1 November 7th 08 06:52 PM
Transfer clipboard from Task pane clipboard(office?) content to Excel (windows?) clipboard? tskogstrom Excel Programming 2 March 6th 07 12:50 PM
Restore clipboard from Task pane clipboard content? tskogstrom Excel Programming 0 January 30th 07 10:48 AM
Keyboard Macro Just Copies Content of Previous Cell Andy Excel Discussion (Misc queries) 1 October 24th 05 11:54 PM


All times are GMT +1. The time now is 05:44 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"