Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Changing the Path In a Usage Log
The below is a macro I copied from one of the postings. The macro
works great, however the file "usage.log" saves in the same directory as the workbook. Can anyone tell me how I can save the "usage.log" to another directoy? Private Sub Workbook_Open() Open ThisWorkbook.Path & "\usage.log" For Append As #1 Print #1, Environ$("userName"), Now Close #1 End Sub |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Changing the Path In a Usage Log
move the usage.log to a directory you want. then change
the code to the path to the new path. this code is not saving as we understand saving. it is opening a file and printing/appending to it then closing the file. same thing as a save in a way but different. -----Original Message----- The below is a macro I copied from one of the postings. The macro works great, however the file "usage.log" saves in the same directory as the workbook. Can anyone tell me how I can save the "usage.log" to another directoy? Private Sub Workbook_Open() Open ThisWorkbook.Path & "\usage.log" For Append As #1 Print #1, Environ$("userName"), Now Close #1 End Sub . |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Changing the Path In a Usage Log
move the usage.log to a directory you want. then change
the code to the path to the new path. this code is not saving as we understand saving. it is opening a file and printing/appending to it then closing the file. same thing as a save in a way but different. -----Original Message----- The below is a macro I copied from one of the postings. The macro works great, however the file "usage.log" saves in the same directory as the workbook. Can anyone tell me how I can save the "usage.log" to another directoy? Private Sub Workbook_Open() Open ThisWorkbook.Path & "\usage.log" For Append As #1 Print #1, Environ$("userName"), Now Close #1 End Sub . |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Changing the Path In a Usage Log
move the usage.log to a directory you want. then change
the code to the path to the new path. this code is not saving as we understand saving. it is opening a file and printing/appending to it then closing the file. same thing as a save in a way but different. -----Original Message----- The below is a macro I copied from one of the postings. The macro works great, however the file "usage.log" saves in the same directory as the workbook. Can anyone tell me how I can save the "usage.log" to another directoy? Private Sub Workbook_Open() Open ThisWorkbook.Path & "\usage.log" For Append As #1 Print #1, Environ$("userName"), Now Close #1 End Sub . |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Changing the Path In a Usage Log
move the usage.log to a directory you want. then change
the code to the path to the new path. this code is not saving as we understand saving. it is opening a file and printing/appending to it then closing the file. same thing as a save in a way but different. -----Original Message----- The below is a macro I copied from one of the postings. The macro works great, however the file "usage.log" saves in the same directory as the workbook. Can anyone tell me how I can save the "usage.log" to another directoy? Private Sub Workbook_Open() Open ThisWorkbook.Path & "\usage.log" For Append As #1 Print #1, Environ$("userName"), Now Close #1 End Sub . |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Changing the Path In a Usage Log
move the usage.log to a directory you want. then change
the code to the path to the new path. this code is not saving as we understand saving. it is opening a file and printing/appending to it then closing the file. same thing as a save in a way but different. -----Original Message----- The below is a macro I copied from one of the postings. The macro works great, however the file "usage.log" saves in the same directory as the workbook. Can anyone tell me how I can save the "usage.log" to another directoy? Private Sub Workbook_Open() Open ThisWorkbook.Path & "\usage.log" For Append As #1 Print #1, Environ$("userName"), Now Close #1 End Sub . |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Changing the Path In a Usage Log
move the usage.log to a directory you want. then change
the code to the path to the new path. this code is not saving as we understand saving. it is opening a file and printing/appending to it then closing the file. same thing as a save in a way but different. -----Original Message----- The below is a macro I copied from one of the postings. The macro works great, however the file "usage.log" saves in the same directory as the workbook. Can anyone tell me how I can save the "usage.log" to another directoy? Private Sub Workbook_Open() Open ThisWorkbook.Path & "\usage.log" For Append As #1 Print #1, Environ$("userName"), Now Close #1 End Sub . |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
Changing the Path In a Usage Log
move the usage.log to a directory you want. then change
the code to the path to the new path. this code is not saving as we understand saving. it is opening a file and printing/appending to it then closing the file. same thing as a save in a way but different. -----Original Message----- The below is a macro I copied from one of the postings. The macro works great, however the file "usage.log" saves in the same directory as the workbook. Can anyone tell me how I can save the "usage.log" to another directoy? Private Sub Workbook_Open() Open ThisWorkbook.Path & "\usage.log" For Append As #1 Print #1, Environ$("userName"), Now Close #1 End Sub . |
#9
Posted to microsoft.public.excel.programming
|
|||
|
|||
Changing the Path In a Usage Log
move the usage.log to a directory you want. then change
the code to the path to the new path. this code is not saving as we understand saving. it is opening a file and printing/appending to it then closing the file. same thing as a save in a way but different. -----Original Message----- The below is a macro I copied from one of the postings. The macro works great, however the file "usage.log" saves in the same directory as the workbook. Can anyone tell me how I can save the "usage.log" to another directoy? Private Sub Workbook_Open() Open ThisWorkbook.Path & "\usage.log" For Append As #1 Print #1, Environ$("userName"), Now Close #1 End Sub . |
#10
Posted to microsoft.public.excel.programming
|
|||
|
|||
Changing the Path In a Usage Log
move the usage.log to a directory you want. then change
the code to the path to the new path. this code is not saving as we understand saving. it is opening a file and printing/appending to it then closing the file. same thing as a save in a way but different. -----Original Message----- The below is a macro I copied from one of the postings. The macro works great, however the file "usage.log" saves in the same directory as the workbook. Can anyone tell me how I can save the "usage.log" to another directoy? Private Sub Workbook_Open() Open ThisWorkbook.Path & "\usage.log" For Append As #1 Print #1, Environ$("userName"), Now Close #1 End Sub . |
#11
Posted to microsoft.public.excel.programming
|
|||
|
|||
Changing the Path In a Usage Log
move the usage.log to a directory you want. then change
the code to the path to the new path. this code is not saving as we understand saving. it is opening a file and printing/appending to it then closing the file. same thing as a save in a way but different. -----Original Message----- The below is a macro I copied from one of the postings. The macro works great, however the file "usage.log" saves in the same directory as the workbook. Can anyone tell me how I can save the "usage.log" to another directoy? Private Sub Workbook_Open() Open ThisWorkbook.Path & "\usage.log" For Append As #1 Print #1, Environ$("userName"), Now Close #1 End Sub . |
#12
Posted to microsoft.public.excel.programming
|
|||
|
|||
Changing the Path In a Usage Log
Private Sub Workbook_Open()
Open "C:\mylogfolder\usage.log" For Append As #1 Print #1, Environ$("userName"), Now Close #1 End Sub or Private Sub Workbook_Open() Open "\\server\sharename\foldername\usage.log" For Append As #1 Print #1, Environ$("userName"), Now Close #1 End Sub Red wrote: The below is a macro I copied from one of the postings. The macro works great, however the file "usage.log" saves in the same directory as the workbook. Can anyone tell me how I can save the "usage.log" to another directoy? Private Sub Workbook_Open() Open ThisWorkbook.Path & "\usage.log" For Append As #1 Print #1, Environ$("userName"), Now Close #1 End Sub -- Dave Peterson |
#13
Posted to microsoft.public.excel.programming
|
|||
|
|||
Changing the Path In a Usage Log
Thanks but I was fortunate to find this solution that works for me
Private Sub Workbook_Open() Const Log As String = "\\Shared\Main_Public\File Name\ Open.LOG" On Error Resume Next Open Log For Append As #1 Print #1, Environ$("userName"), Now Close #1 wrote in message ... move the usage.log to a directory you want. then change the code to the path to the new path. this code is not saving as we understand saving. it is opening a file and printing/appending to it then closing the file. same thing as a save in a way but different. -----Original Message----- The below is a macro I copied from one of the postings. The macro works great, however the file "usage.log" saves in the same directory as the workbook. Can anyone tell me how I can save the "usage.log" to another directoy? Private Sub Workbook_Open() Open ThisWorkbook.Path & "\usage.log" For Append As #1 Print #1, Environ$("userName"), Now Close #1 End Sub . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel changing Path of Formulas | Excel Discussion (Misc queries) | |||
changing the path behind a button | Excel Discussion (Misc queries) | |||
Excel 2000: Changing path of an external data source | Excel Discussion (Misc queries) | |||
Save Linked Doc in Another Folder Without Changing Link Path | Excel Worksheet Functions | |||
changing image control's picture path | Excel Programming |