Open a directory and close workbook

  • Thread starter Thread starter Macropheliac
  • Start date Start date
M

Macropheliac

Hello!
I've been going round and round with this one. Perhaps it's not
possible, but I would like to know how to open a directory and close
the active workbook, leaving the directory open. It seems simple, but
I can't figure it out.

Dim MyDirec As String
Set MyDirec = "C:\Documents and Settings\Owner\My Documents\My Daily
Schedules"

Now what?

A heart felt thanks to anyone who may have a suggestion.

Mac
 
What do you mean by "leave the directory open"?

Hello!
I've been going round and round with this one. Perhaps it's not
possible, but I would like to know how to open a directory and close
the active workbook, leaving the directory open. It seems simple, but
I can't figure it out.

Dim MyDirec As String
Set MyDirec = "C:\Documents and Settings\Owner\My Documents\My Daily
Schedules"

Now what?

A heart felt thanks to anyone who may have a suggestion.

Mac
 
I'm doing a bit of guessing about what you want to accomplish. Try
something like this and see if that is what you were wanting.

__________________

Sub FolderOpen()
Dim retVal

strPath = "C:\Documents and Settings\Steve Yandl\My Documents\Budget"
retVal = Shell("explorer.exe /e, " & strPath, vbNormalFocus)
ActiveWorkbook.Close

End Sub

___________________

Steve Yandl
 
I'm doing a bit of guessing about what you want to accomplish. Try
something like this and see if that is what you were wanting.

__________________

Sub FolderOpen()
Dim retVal

strPath = "C:\Documents and Settings\Steve Yandl\My Documents\Budget"
retVal = Shell("explorer.exe /e, " & strPath, vbNormalFocus)
ActiveWorkbook.Close

End Sub

___________________

Steve Yandl










- Show quoted text -

Hi Steve!

Sorry for taking so long. That is indeed exactly what I was looking
for. It works perfectly now. Thank you very much for your help.


Mac
 

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