matpj,
What does the "Left(ActiveWorkbook.Name, Len(ActiveWorkbook.Name) - 4)"
part evaluate to ?
NickHK
"matpj" <matpj.25hokp_1143733203.3108@excelforum-nospam.com> wrote in
message news:matpj.25hokp_1143733203.3108@excelforum-nospam.com...
>
> hi,
>
> thanks for the response.
> I couldn't find a post with a reply frmo you, but I found another one
> that does exactly what I want, although the spreadsheet I am creating
> will be saved in a Notes database.
>
> I need the log file to be in a specified network path although when I
> try to use that, it throws up an error.
>
> the original code for the log is:
>
>
> Code:
> --------------------
> Sub DoTheLog(myKey As String)
> Open ThisWorkbook.Path & "\" & Left(ActiveWorkbook.Name, _
> Len(ActiveWorkbook.Name) - 4) & "_usage.log" For Append As #1
> Print #1, myKey & vbTab & Application.UserName _
> & vbTab & fOSUserName _
> & vbTab & fOSMachineName _
> & vbTab & Format(Now, "mmmm dd, yyyy hh:mm:ss")
> Close #1
> End Sub
> --------------------
>
>
> i'm trying to change the Open bit to read:
>
>
> Code:
> --------------------
> Open "\\Cs_fs1\Prodvol\Techserv\" & Left(ActiveWorkbook.Name, _
> Len(ActiveWorkbook.Name) - 4) & "_usage.log" For Append As #1
>
> --------------------
>
>
> but when I do this it displays an error saying cannot find path.
> That is a valid path and it is currently mapped to my PC.
>
>
> --
> matpj
> ------------------------------------------------------------------------
> matpj's Profile:
http://www.excelforum.com/member.php...o&userid=21076
> View this thread: http://www.excelforum.com/showthread...hreadid=528071
>
Bookmarks