How JustAnswer Works:
  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site. Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.
Ask Richard Your Own Question
Richard, Software Specialist
Category: Microsoft Office
Satisfied Customers: 38587
Experience:  Over 15 year experience resolving Microsoft Office Issues
Type Your Microsoft Office Question Here...
Richard is online now
A new question is answered every 9 seconds

In excel 2007, is there a command to open a specific file folder

This answer was rated:

In excel 2007, is there a command to open a specific file folder on our network? I have several template files setup, but depending on what type of project, I would like the sales staff to be directed to a specific file folder for the correct template, and supporting documents.
Thank you for your question, my name is Richard.

Yes, you can use this code to do this. Replace c:\folder with the path to your network.

Dim stFolder As String

stFolder = "c:\Folder"

If Len(Dir(stFolder, vbDirectory)) 0 Then
Shell "Explorer.exe /n,/e," & stFolder, vbNormalFocus
MsgBox "The directory does not exist!", vbCritical
End If

If you have any difficulties at all, please do not hesitate to let me know so I can assist you further

Thank you
Customer: replied 4 years ago.



I created a new control "button" and inserted the code, but I am receiving a syntax error. I have attached a screen shot of the code, can you look at it, and tell where I have made the error.



Can I look at your file please Curtis?

- Click the following link:
- Upload the file to that website
- Once it is uploaded, the resulting page will display a "File ID" number.
- Please, give me that "File ID Number"

Thank you
Customer: replied 4 years ago.

The file # XXXXX

thanks, XXXXX XXXXX the problem, it is libraries in your computer, but they are not needed.

Just use this for the code please Curtis, it will work

stFolder = "\\VICTORYSRV1\Share\09 pictures\07 PIC BOOK\Scott"

Shell "Explorer.exe /n,/e," & stFolder, vbNormalFocus

Let me know if you have any difficulties please
Customer: replied 4 years ago.



That is perfect, that answered the question I had, the way I asked it. If I am trying to open a specific file within that folder, should I post that as a seperate question? So you recieve the credit, properly. I guess I should have paid more attention to how I was asking the question. Please let me know?

Yes please Curtis,

Please rate me on this question, then the new question you post here please

Looking forward to the next question

Richard and other Microsoft Office Specialists are ready to help you