L
Little Penny
The script below saves my spreadsheet to a delimited flat file. After
the file is saved is it possible to have the scripted automatically
transfer the file to a shared folder on another computer.
Sub FlatExport()
Dim FileName As Variant
Dim Sep As String
FileName =
Application.GetSaveAsFilename(InitialFileName:=vbNullString,
FileFilter:="Text Files (*.txt),*.txt")
If FileName = False Then
''''''''''''''''''''''''''
' user cancelled, get out
''''''''''''''''''''''''''
Exit Sub
End If
Sep = Application.InputBox("Enter a separator character.",
Type:=2)
If Sep = vbNullString Then
''''''''''''''''''''''''''
' user cancelled, get out
''''''''''''''''''''''''''
Exit Sub
End If
Debug.Print "FileName: " & FileName, "Separator: " & Sep
ExportToTextFile FName:=CStr(FileName), Sep:=CStr(Sep), _
SelectionOnly:=False, AppendData:=True
End Sub
Thanks
Happy New Year
Little Penny
the file is saved is it possible to have the scripted automatically
transfer the file to a shared folder on another computer.
Sub FlatExport()
Dim FileName As Variant
Dim Sep As String
FileName =
Application.GetSaveAsFilename(InitialFileName:=vbNullString,
FileFilter:="Text Files (*.txt),*.txt")
If FileName = False Then
''''''''''''''''''''''''''
' user cancelled, get out
''''''''''''''''''''''''''
Exit Sub
End If
Sep = Application.InputBox("Enter a separator character.",
Type:=2)
If Sep = vbNullString Then
''''''''''''''''''''''''''
' user cancelled, get out
''''''''''''''''''''''''''
Exit Sub
End If
Debug.Print "FileName: " & FileName, "Separator: " & Sep
ExportToTextFile FName:=CStr(FileName), Sep:=CStr(Sep), _
SelectionOnly:=False, AppendData:=True
End Sub
Thanks
Happy New Year
Little Penny