On a different thread of mine, a very helpful member by the name of @Eric W helped me out with a particular macro, to solve a bug type issue I was having.
This macro got me thinking of another possible use for it.
1.) I am looking to be able to select a cell or multiple cells that contain text
2.) Run macro that copies this text into the clipboard
3.) Clears the texts from the selected cells
4.) Now with the text in the clipboard, allows you to paste it into another cell / cells if selection contained more than one cell.
Here is a piece of the code that copies the text data into the clipboard
I tried adding the following line of code in a couple of different areas but unfortunately did not work.
If anyone has an idea of how I can meld the two together, it would be really appreciated.
Thank you to anyone who gives it a shot.
This macro got me thinking of another possible use for it.
1.) I am looking to be able to select a cell or multiple cells that contain text
2.) Run macro that copies this text into the clipboard
3.) Clears the texts from the selected cells
4.) Now with the text in the clipboard, allows you to paste it into another cell / cells if selection contained more than one cell.
Here is a piece of the code that copies the text data into the clipboard
Code:
Sub AddToClipboardThenClearCell()
On Error Resume Next
Set clipboard = New dataobject
clipboard.getfromclipboard
mydata = clipboard.gettext
clipboard.settext ""
clipboard.putinclipboard
Set clipboard = New dataobject
clipboard.settext mydata
clipboard.putinclipboard
End Sub
I tried adding the following line of code in a couple of different areas but unfortunately did not work.
Code:
Selection.ClearContents
If anyone has an idea of how I can meld the two together, it would be really appreciated.
Thank you to anyone who gives it a shot.
Last edited: