Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Make directory structure variable
A macro ends with saving the worksheet. It works for me, but but not for
other users that use my worksheet on their PC. I found my solution in the knowledge base, but I cant find how to make it flexible. My macro ends with: ActiveWorkbook.SaveAs Filename:="C:\Documents and Settings\Owner\My Documents\VvEAH\Financ\2007\Bookdoc " & Format(Now, "yyyy-mm") & ".xls" How do I adjust this statement to make it usefull for all users. Thanks for your help. Paul |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Make directory structure variable
You can find the "my documents" path with something like:
Option Explicit Sub testme() Dim myDocumentsPath As String Dim wsh As Object Set wsh = CreateObject("WScript.Shell") myDocumentsPath = wsh.SpecialFolders.Item("mydocuments") MsgBox myDocumentsPath End Sub Pepestru wrote: A macro ends with saving the worksheet. It works for me, but but not for other users that use my worksheet on their PC. I found my solution in the knowledge base, but I cant find how to make it flexible. My macro ends with: ActiveWorkbook.SaveAs Filename:="C:\Documents and Settings\Owner\My Documents\VvEAH\Financ\2007\Bookdoc " & Format(Now, "yyyy-mm") & ".xls" How do I adjust this statement to make it usefull for all users. Thanks for your help. Paul -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
File directory structure reorg | Links and Linking in Excel | |||
Creating Directory Structure from Cell Value | Excel Worksheet Functions | |||
Create Directory Structure from Cell Value. | Excel Discussion (Misc queries) | |||
VLOOKUP - Saves entire directory structure | Excel Worksheet Functions | |||
How to write directory structure to excel file | Excel Programming |