I copy data from Excel to Notepad using the SendKeys
Excel VBA function.
I'm looking to avoid using the sendkeys.
I have this code:
sub test()
dim wb as Workbook
set wb = "C:\Documents\test.xlsx"
wb.Sheets(2).Range("C2:C" & lRow).Copy
myApp = Shell("Notepad.exe", vbNormalFocus)
SendKeys "^v"
Application.CutCopyMode = False
wb.Sheets(2).Range("C2:C" & lRow).NumberFormat = "@"
end sub
This only copies the data from Excel to Notepad, but after doing some corrections in the Excel file, I want the data in Notepad to be copied to Excel starting from C2.