Hello,
I've been using this bit of code for a while now and I'm sure it worked a week ago, but suddenly its not.
I'm getting Runtime error 438 Object doesn’t support this property or method.
Can anyone help?
Thanks
Public Sub ExpFile_Excel()
Mth = Format(Now, "YYYYMM")
Dte = Format(Now, "YYYYMMDD")
Tme = Format(Now, "HH-MM-SS")
Set FDialog = Application.FileDialog(msoFileDialogSaveAs)
With FDialog
.AllowMultiSelect = False
.InitialFileName = FileName
.Title = "ATMT: Please select a save location"
.Filters.Clear
.Filters.Add "Microsoft Excel 2003", "*.xls"
.Filters.Add "Microsoft Excel 2007", "*.xlsx"
.Filters.Add "Microsoft Excel 2007", "*.xlsm"
If .Show = True Then
For Each varFile In .SelectedItems
DestFile = .SelectedItems(1)
Next
End If
End With
End Sub
I've been using this bit of code for a while now and I'm sure it worked a week ago, but suddenly its not.
I'm getting Runtime error 438 Object doesn’t support this property or method.
Can anyone help?
Thanks
Public Sub ExpFile_Excel()
Mth = Format(Now, "YYYYMM")
Dte = Format(Now, "YYYYMMDD")
Tme = Format(Now, "HH-MM-SS")
Set FDialog = Application.FileDialog(msoFileDialogSaveAs)
With FDialog
.AllowMultiSelect = False
.InitialFileName = FileName
.Title = "ATMT: Please select a save location"
.Filters.Clear
.Filters.Add "Microsoft Excel 2003", "*.xls"
.Filters.Add "Microsoft Excel 2007", "*.xlsx"
.Filters.Add "Microsoft Excel 2007", "*.xlsm"
If .Show = True Then
For Each varFile In .SelectedItems
DestFile = .SelectedItems(1)
Next
End If
End With
End Sub