View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett[_2_] Don Guillett[_2_] is offline
external usenet poster
 
Posts: 1,522
Default Choose which cell to paste data

I am not exactly sure what you have and what you want. Is this one or more
cells to copy? Do the source cells have color,merging,comments. Do you want
to copy one or more cells with OUT these. Perhaps a sample file.
If desired, send your file to my address below. I will only look if:
1. You send a copy of this message on an inserted sheet
2. You give me the newsgroup and the subject line
3. You send a clear explanation of what you want
4. You send before/after examples and expected results.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Mik" wrote in message
...
On 8 May, 16:49, "Don Guillett" wrote:
Try this. Select the cell to copyfire the macroselect the paste
cellmacro
finishes job

Sub copytoselectionSAS()
Selection.Copy Application.InputBox(Prompt:= _
�"Select your copy cell", Title:="SalesAid Software", Type:=8)
�With ActiveCell
� � .Interior.ColorIndex = xlNone
� � .ClearContents
� � .ClearComments
� � .UnMerge
End With

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"Mik" wrote in message

...



Using VBA, I have copied the contents / comments / color etc.. of a
particular cell (single or merged), and wish to manually select (using
mouse pointer) which cell to paste the data.


So, I guess the VBA code should pause / stop until a new cell is
chosen and confirmed.
Is this posible?


My code so far is....


Private Sub CommandButton4_Click()
' MOVE data
Dim Answer As String
Dim MyNote As String
MyNote = "Move selected data?"
Answer = MsgBox(MyNote, vbQuestion + vbYesNo, "For Confirmation")
If Answer = vbNo Then
� �Exit Sub
End If
Selection.Copy
With ActiveCell
� �.Interior.ColorIndex = xlNone
� �.ClearContents
� �.ClearComments
� �.UnMerge
End With
MsgBox ("Please select new cell, where data will be copied to. ")


?????????????


ActiveSheet.Paste
End Sub


Thanks in advance.
Mik- Hide quoted text -


- Show quoted text -


Thank you both for your reply.....

The cells that are being copied / moved can sometimes have a border
along one of it's edges (left or right, depending on it's location).
When i run your code, the borders also copy across to the new
location.

I don't want this to happen.
I have tried utilising the 'PasteSpecial
Paste:=xlPasteAllExceptBorders' routine, but i get errors.
Possibly entering it wrong.

Can you please assist?

Thanks
Mik