Form button to open up directory ------M-------

  • Thread starter Thread starter Mark909
  • Start date Start date
M

Mark909

Hello,

I want a button that when pressed will open up a specific directory where
files are saved.

Thanks for help!
 
You want to use this construct ...

Dim strPath As String

strPath = "S:\Data\IT\Production\"
Application.FollowHyperlink strPath
 
Danny thanks for answer but im not sure what to do!

How do i use a construct?
 
There will be mpeg videos saved in the file. Its so the user can open them
 
I don't know what more to tell you. You have a button and I gave you
the code to put on the button. Are you saying that this is the first button
you've ever written code for and don't know where to begin. If so, that's
OK, but you should mention that in your post.

Go to the Click event of the button and add the code I show below. Of
course, you'll need to change my strPath to your file. I'm showing a
directory folder, because that's what you originally asked for, but you
can use the same code to open a file.

The next thing you're probably going to ask is how you get the file path
in there. If it's not hard coded, you'll have to reference a control. That
will depend on your application
 

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

Back
Top