From an Access Module I am trying to save an excel file under a new name. The problem is, I need to it to prompt the user for the file name and location.
I've tried using the '.GetSaveFileName' that I found in VBA help, but it doesn't seem to work in Access. Any help is greatly appreciated.
Here is my code
Thanks
I've tried using the '.GetSaveFileName' that I found in VBA help, but it doesn't seem to work in Access. Any help is greatly appreciated.
Here is my code
Code:
Sub alterTXT()
Dim dbs As Database
Dim objXL As Object, objWB As Object
DoEvents
Set objXL = CreateObject("Excel.Application")
Set dbs = CurrentDb()
With objXL
.Visible = True
Set objWB = .Workbooks.Open("C:\Local\Shared\FilterTemp.xls")
.fileSaveName = Application.GetSaveAsFilename(fileFilter:="Text Files (*.txt), *.txt")
End With
End Sub
Thanks