1.. Open the workbook you want to save for use in another program.
2.. On the File menu, click Save As.
3.. In the File name box, type a new name for the workbook.
4.. In the Save as type list, click a file format that you know you can
open in the other program. (e.g. For Notepad select any file format having
*.txt )
5.. Click Save.
Using Macro try this,
Sub Export2Notepad()
'saves active worksheet as text file in current directory
'& opens in Notepad.
Const txtfilename As String = "Book2.txt"
Dim wb As Workbook
On Error GoTo xit
If ActiveSheet.Type = xlWorksheet Then
ActiveSheet.Copy
Set wb = ActiveWorkbook
Application.DisplayAlerts = False
wb.SaveAs Filename:= _
txtfilename, FileFormat:=xlTextMSDOS, _
CreateBackup:=False
Application.DisplayAlerts = True
wb.Close False
Shell "Notepad " & CurDir & "\" & txtfilename, vbNormalFocus
Else
MsgBox "Please select Worksheet to export to Notepad.", vbCritical,
"Export to Notepad"
End If
Exit Sub
xit:
MsgBox Err.Description
End Sub
Regards,
Shailesh Shah
http://in.geocities.com/shahshaileshs/
(Excel Add-ins Page)
If You Can't Excel with Talent, Triumph with Effort.