Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default stop copy highlight without clearing clipboard

Is it possible to put a range on the clipboard, then stop the copied range
highlight (the walking ants) without
clearing the clipboard?

RBS

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,173
Default stop copy highlight without clearing clipboard

RBS

Not as far as I know, the walking ants show Excel is in CutCopyMode, setting
this to false clears the clipboard...why not save the data to a hidden sheet
or similar?

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
www.nickhodge.co.uk
HIS


"RB Smissaert" wrote in message
...
Is it possible to put a range on the clipboard, then stop the copied range
highlight (the walking ants) without
clearing the clipboard?

RBS



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default stop copy highlight without clearing clipboard

To the best of my knowledge, no.

You might be able to do something with the screenupdating command.

--
Regards,
Tom Ogilvy


"RB Smissaert" wrote:

Is it possible to put a range on the clipboard, then stop the copied range
highlight (the walking ants) without
clearing the clipboard?

RBS


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default stop copy highlight without clearing clipboard

Since the clipboard can store a number of items (Excel 2003) you could
perhaps copy a cell somewhere after you copied the range to the clipboard.

This will stop "the walking ants" on your range but the cell you selected
will still have them.



"Tom Ogilvy" wrote in message
...
To the best of my knowledge, no.

You might be able to do something with the screenupdating command.

--
Regards,
Tom Ogilvy


"RB Smissaert" wrote:

Is it possible to put a range on the clipboard, then stop the copied
range
highlight (the walking ants) without
clearing the clipboard?

RBS




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default stop copy highlight without clearing clipboard

Found a way that suits my purpose as I don't need the formatting:


Sub RangeTextToClipBoard(rng As Range)

'Needs a reference to the Microsoft Forms 2.0 Object Library
'but doesn't need an actual UserForm in the Project
'-----------------------------------------------------------

Dim i As Long
Dim c As Long
Dim arr
Dim strRange As String
Dim oDataObject As DataObject

Set oDataObject = New DataObject

If rng.Cells.Count = 1 Then
strRange = rng
Else
arr = rng
For i = 1 To UBound(arr)
For c = 1 To UBound(arr, 2)
If c < UBound(arr, 2) Then
strRange = strRange & arr(i, c) & vbTab
Else
If i < UBound(arr) Then
strRange = strRange & arr(i, c) & vbCrLf
Else
strRange = strRange & arr(i, c)
End If
End If
Next
Next
End If

With oDataObject
.SetText strRange
.PutInClipboard
End With

End Sub


Sub Test()

RangeTextToClipBoard Range(Cells(1), Cells(2, 4))

End Sub


RBS


"RB Smissaert" wrote in message
...
Is it possible to put a range on the clipboard, then stop the copied range
highlight (the walking ants) without
clearing the clipboard?

RBS




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
clearing the clipboard [email protected] Excel Discussion (Misc queries) 2 April 25th 07 09:11 AM
Clearing the clipboard Avi Excel Programming 4 November 18th 05 01:08 PM
clearing the clipboard mike Excel Programming 1 March 4th 04 08:34 PM
Clearing clipboard Charles Maxson Excel Programming 1 December 1st 03 02:46 PM
Clearing clipboard Gord Dibben Excel Programming 1 November 27th 03 11:37 AM


All times are GMT +1. The time now is 02:31 AM.

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

About Us

"It's about Microsoft Excel"