Browse for file glitch (1 Viewer)

ili_sophia

Registered User.
Local time
Tomorrow, 01:19
Joined
Aug 23, 2017
Messages
40
Hi there,

I have a form where the users can browse for a file and import their excel into access.

however, there seems to be a problem with the browse pop up screen. the browse pop up screen comes out fine with my ms access 2016. But when I tried it on other computer using ms access 2013, the browse pop up screen keeps prompting up before it shows the actual browse pop up screen to allow the users to select the file

it the only way to stop this is to upgrade the ms access 2013 to 2016 or is there any other way?
 

Ranman256

Well-known member
Local time
Today, 13:19
Joined
Apr 9, 2015
Messages
4,339
you didnt say what you are using to browse.
 

ili_sophia

Registered User.
Local time
Tomorrow, 01:19
Joined
Aug 23, 2017
Messages
40
i am using a browse command button on the form.

my code:
Private Sub btnKnittingBrowse_Click()
Dim diag As Office.FileDialog
Dim item As Variant


Set diag = Application.FileDialog(msoFileDialogFilePicker)
diag.AllowMultiSelect = False
diag.Title = "Please select an Excel Spreadsheet"
diag.Filters.Clear
diag.Filters.Add "Excel Spreadsheet", "*.xls, *.xlsx"

If diag.Show Then

For Each item In diag.SelectedItems
Me.KnittingFileName = item
Next

End If

End Sub
 

JHB

Have been here a while
Local time
Today, 19:19
Joined
Jun 17, 2012
Messages
7,732
... But when I tried it on other computer using ms access 2013, the browse pop up screen keeps prompting up before it shows the actual browse pop up screen to allow the users to select the file
What do you mean, (printscreen)?
I've tried your code in MS-Access 2010, no problem.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 01:19
Joined
May 7, 2009
Messages
19,231
what is popping?


you can revise the code if this will fix:


Dim diag As FileDialog
Dim item As Variant


Set diag = Application.FileDialog(3) '(msoFileDialogFilePicker)
 

Users who are viewing this thread

Top Bottom