K
Kevin
I am trying to automate the process of copying
information out of Excel and pasting it into Notepad.
Saving the information from Excel as a text file does not
work for the task I am trying to accomplish. Below is the
code I created to do this procedure. My thought process
was to use the Shell function to open Notepad and the
specific file and then the DDEInitiate to open the
channel to the file. But at the DDEInitiate line I get
the question box "Remote data not accessible. Start
application Notepad.exe?", I click Yes and then I
get "Run-time Error '13'; Type mis-match" and the
procedure stops. I then have 2 windows of the GL.txt file
open. Any help would be greatly appreciated.
Sub Test()
Sheets("Download").Select
Range("A2:A55").Select
Selection.copy
Notepd = Shell("C:\Windows\System32\Notepad.exe
C:\GL.txt", 1)
Channelnumber = Application.DDEInitiate
("Notepad", "C:\GL.txt")
Application.DDEExecute Channelnumber, "[EDITPASTE]"
End Sub
information out of Excel and pasting it into Notepad.
Saving the information from Excel as a text file does not
work for the task I am trying to accomplish. Below is the
code I created to do this procedure. My thought process
was to use the Shell function to open Notepad and the
specific file and then the DDEInitiate to open the
channel to the file. But at the DDEInitiate line I get
the question box "Remote data not accessible. Start
application Notepad.exe?", I click Yes and then I
get "Run-time Error '13'; Type mis-match" and the
procedure stops. I then have 2 windows of the GL.txt file
open. Any help would be greatly appreciated.
Sub Test()
Sheets("Download").Select
Range("A2:A55").Select
Selection.copy
Notepd = Shell("C:\Windows\System32\Notepad.exe
C:\GL.txt", 1)
Channelnumber = Application.DDEInitiate
("Notepad", "C:\GL.txt")
Application.DDEExecute Channelnumber, "[EDITPASTE]"
End Sub