General information
Title:
Shared Excel File Deletes Itself
Environment versions
Microsoft Office:
Office 2010
I built a group of log files in Excel 2010, that use VBA. Since they are multi-user, I made them Shared files. For some reason, when remote users try to Save a log, it frequently deletes itself. They are connected by MPLS, and using Windows 7. This never happens to local users. Any ideas?
Jerry
P.S.: In the Open Method, I set:
Application.DefaultSaveFormat = xlOpenXMLWorkbookMacroEnabled
Application.ActiveWorkbook.ProtectSharing
It seems to delete itself towards the beginning of the AfterSave method. Here is the code:
Dim gcRows As Variant, gcITNames As Variant, PreviousCell As Range, gnFirstEmptyRow As Variant
Private Sub Workbook_AfterSave(ByVal Success As Boolean)
On Error GoTo HasGoodName
If Not InStr(UCase(Application.ActiveWorkbook.Path), UCase("(The IP Address and Path)") > 0 Then
ActiveWorkbook.SaveCopyAs ("(The IP Address and Path)" + ActiveWorkbook.Name) 'To save to the network folder, not to the Documents Library.
End If
On Error GoTo 0
HasGoodName:
If NOT gcRows = "" Then 'Lists rows that were edited.
Dim loOutlook As Object
Dim loNamespace As Object
Dim loMailItem1 As Object
Dim loFolder As Object
Dim loConn As Object
Dim loRS As Object
Set loConn = CreateObject("Adodb.connection")
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only