Hello, I have this code which imports a *.txt file into a table.how can I say change the table to the name of the text file not a fixed name?
Private Sub ImportData_Click()
ImportCompleted = Empty
Dim path As String
path = FilePathText.Value & ""
Dim tblName As String
tblName = "ZM"
If path = "" Then
MsgBox "You need to select a file to import!"
Else
Call Importing.import_ZM(path, tblName)
End If
ImportCompleted = "Import Completed!"
End Sub
Private Sub ImportData_Click()
ImportCompleted = Empty
Dim path As String
path = FilePathText.Value & ""
Dim tblName As String
tblName = "ZM"
If path = "" Then
MsgBox "You need to select a file to import!"
Else
Call Importing.import_ZM(path, tblName)
End If
ImportCompleted = "Import Completed!"
End Sub