Reference needed?

J

John Keith

On Error Resume Next
Dim path As String
Dim fileName As String
If Application.Name = "Microsoft Excel" Then
path = Application.ActiveWorkbook.path
fileName = Application.ActiveWorkbook.Name
ElseIf Application.Name = "Microsoft Access" Then
path = Application.CurrentProject.path
fileName = Application.CurrentProject.Name
Else
MsgBox Application.Name & " not currently supported", vbCritical,
"Automated File Transfer Module"
bShellFTP = False
Exit Function
End If
On Error GoTo 0
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top