![]() |
Open a directory and close workbook
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 |
Open a directory and close workbook
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 wrote in message ups.com... 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 |
Open a directory and close workbook
On Jun 2, 10:59 pm, "Steve Yandl" wrote:
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 wrote in message ups.com... 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- Hide quoted text - - 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 |
All times are GMT +1. The time now is 04:42 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com