Open explorer and filter file selection

S

Steven

Example:
Shell "explorer.exe " + "C:\", vbMaximizedFocus

I would like to be able to filter down on a string like:
-----------------------------
Dim strExplorer as String
strExplorer = *Steven*
-----------------------------
Then using the Shell above it would open explorer and just show me files
with the name Steven in them. Then either opening a file or close explorer
is all I would do from there.

Is that possible?

Thanks,

Steven
 
C

Chris O''''Neill

Steven said:
Example:
Shell "explorer.exe " + "C:\", vbMaximizedFocus

I would like to be able to filter down on a string like:
-----------------------------
Dim strExplorer as String
strExplorer = *Steven*
-----------------------------
Then using the Shell above it would open explorer and just show me files
with the name Steven in them. Then either opening a file or close explorer
is all I would do from there.

Is that possible?

Check this out:

http://www.mvps.org/access/api/api0001.htm

You'll notice that it's filtering on file extensions (e.g. ".XLS") but I
don't see why you couldn't filter on anything (e.g. "Steven.*") and it would
work too. Just a matter of editing the strFilter lines in the code. Heck,
without too much effort you could even modify it so you can pass it the
filter that you want.

Hope that helps...

Regards, Chris
 
S

Steven

Chris,

Very interesting. I am looking for something different here.

I want to see the Windows Explorer exactly like:
Shell "explorer.exe " + "C:\", vbMaximizedFocus

except I want to be able to filter on a specific string in the name which I
will use a variable to define the string.

Thank,

Steven
 
C

Chris O''''Neill

Steven said:
Very interesting. I am looking for something different here.

I want to see the Windows Explorer exactly like:
Shell "explorer.exe " + "C:\", vbMaximizedFocus

except I want to be able to filter on a specific string in the name which I
will use a variable to define the string.


Hmmm... Can't help you there. Sorry!

Regards, Chris
 
S

Steven

Now that I have worked with the website you recommended I see that it
actually does what I want. Just in a little different way than I expected
but the result is the same and actually more robust than what I was thinking.

Thank you for your help.
 
C

Chris O''''Neill

Glad to be of help. It's a great little subroutine that's useful in a number
of ways.

Btw, that site (www.mvps.org) is a wonderful resource of Access stuff, as is
this one:

http://www.allenbrowne.com/tips.html

I'd say that those two sites are the source of the answers to about half of
the questions I've had in recent times. Of course, this forum is the souce
of the other half! :D

Regards, Chris
 

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