Forum Discussion
Mike_kelly140
Nov 01, 2022Copper Contributor
Unbound Text box Value to strPathFile variant in Access using Visual basic.
I am in need of some help. I am trying to import an excel book, with different sheets into Access. The problem I am having is copying the link from the Textfilename to module1 so that it is somewhat ...
Mike_kelly140
Nov 07, 2022Copper Contributor
Sorry for the late reply.
I was able to correct it by adding a text box and hiding it. Then I was able to pulled in the data I needed into the module code.
Private Sub txtFileName_AfterUpdate()
Dim diag As Office.FileDialog
Dim Item As Variant
Dim File As Variant
If diag.Show Then
File = Item
End If
End Sub
Thanks
Mike