atadbitslow
Programmer
Can someone help me with the distinction and where to put it?? See below for previously posted ques--thanks!
Is there a switch or another way to automatically overwrite a file if it already exists? I am using the output to command in a macro to output a report to Excel format with a given name, but I don't want the user to have to answer the overwrite questions??
Thanks!
RickSpr (MIS) Mar 26, 2001
Maybe the simplest way would be to write a VBA procedure to delete the file if it exists:
Public Sub DeleteFile(FilePath As String)
On Error Resume Next
Kill FilePath
End Sub
Then just insert a RunCode action with the Function Name set to: DeleteFile("C:\My Documents\My File.ext"
Rick Sprague
maddieboo (Programmer) Apr 2, 2001
Thanks Rick--I finally got around to doing this, but I got an error that said "The expression you entered has a function name that Access can't find."
I put the function under modules--is that correct? Should it be a public function instead of sub?
Thanks!
Is there a switch or another way to automatically overwrite a file if it already exists? I am using the output to command in a macro to output a report to Excel format with a given name, but I don't want the user to have to answer the overwrite questions??
Thanks!
RickSpr (MIS) Mar 26, 2001
Maybe the simplest way would be to write a VBA procedure to delete the file if it exists:
Public Sub DeleteFile(FilePath As String)
On Error Resume Next
Kill FilePath
End Sub
Then just insert a RunCode action with the Function Name set to: DeleteFile("C:\My Documents\My File.ext"
Rick Sprague
maddieboo (Programmer) Apr 2, 2001
Thanks Rick--I finally got around to doing this, but I got an error that said "The expression you entered has a function name that Access can't find."
I put the function under modules--is that correct? Should it be a public function instead of sub?
Thanks!