View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Shell command to post to notepad

Here is a particularly nasty example

Shell "Notepad.exe", 1
DoEvents
Application.SendKeys "ABC" & Chr(13), True
Application.SendKeys "XYZ", True
AppActivate Application.Caption

but would it not be better to just write to a text file directly?

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Mbt6" wrote in message
...
I want to paste some information to note pad from excel

in vba I do something like

Range("c2").Select
Range(Selection, Selection.End(xlDown)).Copy
Shell("notepad.exe")


I need something in the Shell command to make the notepad window active,

and
be able to paste to it. Any ideas?

--thanks --mike