Create a macro to launch notepad while in Excel.

G

Guest

I'd like to create a macro to launch notepad while in Excel. The macro
should then return to the opened spreadsheet in Excel.
 
P

papou

Hi
Shell "NOTEPAD.EXE"
AppActivate "Microsoft Excel"
(tested on Win Xp Pro + Excel 2003)
HTH
Cordially
Pascal
 
J

Jason Morin

Sub OpenNotepad()
Dim RetVal As Variant
RetVal = Shell("C:\Windows\Notepad.exe", 4)
MsgBox "Notepad is open."
End Sub
 
G

Gareth Roberts

Just to add to this, if you have a specific file in mind, you can add it to
the command line e.g.

shell "notepad c:\myfile.txt"

Gareth
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top