Information générale
Titre:
Shared Excel File Deletes Itself
Versions des environnements
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")
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement