Questions

VBA Paste mutliple line text into a single cell

+
0 Votes
Locked

VBA Paste mutliple line text into a single cell

mark.ivanowski
I manually am copying multiple line text from VBE Modules (comments) and paste into a single cell in Excel. See the steps:
In VBE Modules select multiple lines.
Copy
In Excel: Select a cell, press {F2} and paste.
How can I write a code to edit Cell {F2} and paste?
I tried the follow and did not work (it pasted to multiple cell instead a single cell)

Sub EditPaste()
'Edit Cell and Paste whatever is in the Clipboard.and UnWrap
ActiveCell.Select
Application.SendKeys "{F2}"
ActiveSheet.Paste
Application.Run "PERSONAL.XLSB!UnWrap"
End Sub