Open dialog box.

R

ruralguy via AccessMonster.com

Put *all* of the code in a standard module of its own named something like
basFileOpen. Then the code behind your button will look something like:

Me.YourFileNameControl = GetOpenFile(CurrentProject.Path, "Select Some File")
 
P

Perry

If Office XP or later:
Set a reference to Office XX object library and go

Dim f As FileDialog

note: look at the filter property of the FileDialog obect

--
Krgrds,
Perry

System:
Vista/Office Ultimate
VS2005/VSTO2005 SE
 
S

shmoussa

Okay I created a new module and pasted all of the code, from the CODE
START to CODE FINISH (without including those specific lines
themselves) and named it basOpenFile. I created a new button, and used
the code from above so that the button's code looks like this:

Private Sub Command231_Click()

Me.basOpenFile = GetOpenFile(CurrentProject.Path, "Select Some File")

End Sub

When I clikc the command button, it highlights ".basOpenFile =" and
says method or data member not found.

I also tried what you said Daniel, however also generated an error.
I'm not sure exactly where and where to paste what you gave me, and
what I am supposed to replace.

I'd appreciate it if you can help me figure this out.
 
S

shmoussa

I need to also filter the options to only display .csv and .xls files.

When the used clicks the import data command button, they will the
file and click okay. I want the csv file to be imported using an
Import Specification called "Disks." How can this be done?
 
R

ruralguy via AccessMonster.com

Let's get it working first. This line:
Me.basOpenFile
needs to point to a control on your form or a Dimed variable. ie:

Me.YourTextBoxControlName =
 
R

ruralguy via AccessMonster.com

You may wish to start a new thread on this last question so others will join
in.
 

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