Clipboard not being cleared. 
Author Message
 Clipboard not being cleared.

Good day to all.

One of my users reported to me that when data has been copied to the
clipboard, it retain the datas into it. Here is my code:

Private Sub cmdCopy()
   Set clipData = New DataObject
   DoEvents
   clipData.Clear
   DataToCopy = "This is my text"
   clipData.SetText DataToCopy, 1
   clipData.PutInClipboard
End Sub

But this data will remain in the clipboard and if I select another data
string and put it in the clipboard it will be appended to the previous
DataToCopy. How can I prevent that ?? It doesn"t seem to clear even though
the clipdata.clear has been added to the beginning of the procedure.

Awaiting your feedback.

Regards

--

Daniel Caron



Sun, 27 Jun 2004 14:13:17 GMT  
 Clipboard not being cleared.
Never mind folks, I did figure it out by doing DataToCopy=""



Quote:
> Good day to all.

> One of my users reported to me that when data has been copied to the
> clipboard, it retain the datas into it. Here is my code:

> Private Sub cmdCopy()
>    Set clipData = New DataObject
>    DoEvents
>    clipData.Clear
>    DataToCopy = "This is my text"
>    clipData.SetText DataToCopy, 1
>    clipData.PutInClipboard
> End Sub

> But this data will remain in the clipboard and if I select another data
> string and put it in the clipboard it will be appended to the previous
> DataToCopy. How can I prevent that ?? It doesn"t seem to clear even though
> the clipdata.clear has been added to the beginning of the procedure.

> Awaiting your feedback.

> Regards

> --

> Daniel Caron




Sun, 27 Jun 2004 14:29:51 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Access XP: Clearing the clipboard / not saving data to the clipboard

2. Listview1.listitems.clear does not clear

3. I am trying to update a record, i am not using data control

4. I am trying to update a record, i am not using data control

5. Clearing the clipboard/memory

6. Clear the clipboard

7. Clipboard.clear

8. Clearing the clipboard from Access

9. Clear Clipboard

10. Clipboard.Clear - Returns Error 424 - Object Required

11. clear clipboard

12. Clearing the Clipboard

 

 
Powered by phpBB® Forum Software