LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 36
Default Run Time Error 75

I built a VB application allowing personnel in our company access to
numerous Excel files on our share drive. To get a sense as to which
users were using which reports I added the following macro to this
application which logs the user name and the Excel workbook they
retrieved. This worked fine for years until we moved to Excel 2000.
Now the user gets the "Run Time Error 75 Path/File Access Error", upon
clicking 'end' they still get the report, but it is an annoyance I'd
like to correct.

I went to Microsoft's Knowledge base regarding 'Run Time Error 75',
and it said there is problem with VBA when the Name statement is
involved. However I did not understand the language of the
'work-around'.

I greatly appreciate any ideas on how I can resolve this.

Thank you....


Option Explicit
Private Sub Workbook_Open()

Dim LogDir As String
Dim LogFile As String
Dim myFileNum As Long
Dim testDir As String

'**This is the name and location of the log on the shared

LogDir = "\\phx1ns01\sales\Brand\Log Texts\"
LogFile = LogDir & "\log.txt"

testDir = ""
On Error Resume Next

testDir = Dir(LogDir, vbDirectory)
On Error GoTo 0

If testDir = "" Then
'not connected or spelling error!
Exit Sub
End If

myFileNum = FreeFile()

Open LogFile For Append As #myFileNum
Print #myFileNum, ThisWorkbook.FullName & vbTab _
& Application.UserName & vbTab & Now
Close #myFileNum

End Sub
 
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
Visual Basic Error Run Time Error, Type Mismatch Meg Partridge Excel Discussion (Misc queries) 12 September 10th 08 06:10 PM
run-time error '91'-Close Button error ASCO IS Help Excel Discussion (Misc queries) 1 May 8th 06 04:25 PM
Run time error 1004, General ODBC error [email protected] New Users to Excel 0 September 19th 05 01:41 AM
Run-time error '11' & Run-time error '1004' Piers Clinton-Tarestad Excel Programming 0 January 9th 04 08:35 PM
Run-time error '11' & Run-time error '1004' Piers Clinton-Tarestad Excel Programming 0 January 9th 04 07:45 PM


All times are GMT +1. The time now is 01:11 PM.

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

About Us

"It's about Microsoft Excel"