Macro to open Notepad

gavindowding

New Member
Joined
May 8, 2006
Messages
28
Hi, i'm trying to write a macro that will open notepad and then copy column A into it then save as a certain filename

But i dont now where to start!

Thanks
 
can anyone help me to open the notepad via path assigned in the string my code is below...

dim dinesh,deepan,fpath as string

DAT = Date$
TIM = Format(Time, "hh-mm-ss")
Sheets("ciq").Select
FNAM = Range("A2").Value
Sheets("CMD").Select
FPATH = Application.ActiveWorkbook.Path
deepan = "\" + FNAM + "_" + DAT + "_" + TIM + ".txt"
ExportToTextFile FNAME:=FPATH & deepan, Sep:=";", _
SelectionOnly:=False, AppendData:=True
dinesh = FPATH & deepan
Shell "notepad.exe ""dinesh""", vbNormalNoFocus
 
Upvote 0

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".

Forum statistics

Threads
1,221,442
Messages
6,159,905
Members
451,601
Latest member
terrynelson55

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top