Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Shell command to post to notepad

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
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




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Shell command to post to notepad

BTW, paste would be

Sub Tester3()
Range(Range("c2"), Range("c2").End(xlDown)).Copy
Shell "Notepad.exe", 1
DoEvents
Application.SendKeys "^v", True
AppActivate Application.Caption
End Sub




--
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




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Shell command to post to notepad

Is there a similar shell command from webpage (copy one or two items from a
table in the webpage )
to excel
I know how to get a table from webpage.using web query.
Or can this be only from excel to another microsoft office item.
thanks.



"Bob Phillips" wrote in message
...
BTW, paste would be

Sub Tester3()
Range(Range("c2"), Range("c2").End(xlDown)).Copy
Shell "Notepad.exe", 1
DoEvents
Application.SendKeys "^v", True
AppActivate Application.Caption
End Sub




--
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







Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Shell command and Notepad SA3214 Excel Programming 1 May 15th 05 11:57 AM
Shell Command JOHN Excel Programming 1 November 17th 04 10:39 AM
Shell command MAx Excel Programming 2 June 4th 04 04:11 PM
xp shell command using vba Sudhendra Excel Programming 2 February 16th 04 05:56 AM
SHELL command Robin Clay[_3_] Excel Programming 3 October 17th 03 02:50 PM


All times are GMT +1. The time now is 02:46 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"