NeedsHelp2
New Member
- Joined
- Nov 20, 2005
- Messages
- 22
I've managed to find out how to export a worksheet as an excel file by searching past posts. What I would like to do is save it as either a CSV or text file. Despite having tried numeous ways I've failed and am once again seeking assistance.
This is the code that I'm currently using which allows you to save to your chosed directory:
This is the code that I'm currently using which allows you to save to your chosed directory:
Code:
Dim MyName As String
Dim LastRow As Long
Dim MyFileName As String
'==================Other Code
Dim otlApp As Object, otlNewMail As Object
Dim FileName As String, FSave, FName As String
MyName = Format(Date, "yy mm dd") ' & ".xls"
FSave = Application.GetSaveAsFilename(InitialFileName:=Sheets("sheet1").Range("D3").Value & " Backup " & MyName)
If TypeName(FSave) = "Boolean" Then Exit Sub
If Mid$(FSave, Len(FSave), 1) = "." Then
FSave = Mid$(FSave, 1, (Len(FSave) - 1))
End If
FName = Right(FSave, Len(FSave) - InStrRev(FSave, "\"))