Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,758
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel changing Path of Formulas Peg Excel Discussion (Misc queries) 5 April 7th 09 06:18 PM
changing the path behind a button derksj Excel Discussion (Misc queries) 1 September 11th 08 01:58 PM
Excel 2000: Changing path of an external data source Craig Excel Discussion (Misc queries) 1 December 11th 07 05:03 PM
Save Linked Doc in Another Folder Without Changing Link Path jeannie v Excel Worksheet Functions 0 August 31st 06 05:48 PM
changing image control's picture path No Name Excel Programming 2 October 5th 04 08:09 PM


All times are GMT +1. The time now is 09:49 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"