Hi, I want to use a module for creating a window file broswer, found here.
It is going to be use to insert an excel file in a table.
The problem is that when I click on cancel, it gives me an error since it doesn't have the string of the filename.
How can I correct that?
At first, this is what I did:
Then I added this, but still gives me an error.
The operation of actually importing the file works, it's just the cancel button that isn't.
It is going to be use to insert an excel file in a table.
The problem is that when I click on cancel, it gives me an error since it doesn't have the string of the filename.
How can I correct that?
At first, this is what I did:
Code:
DoCmd.TransferSpreadsheet acImport, , "MainPrinterTable", GetOpenFile(), True
Then I added this, but still gives me an error.
Code:
Dim strFilePath As String
strFilePath = GetOpenFile()
If Not IsNull(strFilePath) Then
DoCmd.TransferSpreadsheet acImport, , "MainPrinterTable", strFilePath, True
End If
The operation of actually importing the file works, it's just the cancel button that isn't.