Djblois
01-07-2009, 11:08 AM
I have a module in my addin that makes it easier for my users to update the addin because it removes the toolbar and deletes the addin from the addin folder. Here is the code that I use:
Set obj = CommandBars("Business_Reporting_Today")
'Save Toolbar Position for future install
If Err.Number = 0 Then
SaveSetting "BRT", "Toolbar", "Top", obj.Top
SaveSetting "BRT", "Toolbar", "Left", obj.Left
SaveSetting "BRT", "Toolbar", "RowIndex", obj.RowIndex
End If
obj.Delete 'Delete Toolbar
With Workbooks("Business Reporting Today.xlam")
.Saved = True
.ChangeFileAccess xlReadOnly
Kill .FullName
.Close False
End With
However some of my users it is crashing on these lines:
.ChangeFileAccess xlReadOnly
Kill .FullName
I was going to copy the message but it just suddenly stopped giving me this issue. Nothing changed but the issue is gone. Anybody have any ideas?
Set obj = CommandBars("Business_Reporting_Today")
'Save Toolbar Position for future install
If Err.Number = 0 Then
SaveSetting "BRT", "Toolbar", "Top", obj.Top
SaveSetting "BRT", "Toolbar", "Left", obj.Left
SaveSetting "BRT", "Toolbar", "RowIndex", obj.RowIndex
End If
obj.Delete 'Delete Toolbar
With Workbooks("Business Reporting Today.xlam")
.Saved = True
.ChangeFileAccess xlReadOnly
Kill .FullName
.Close False
End With
However some of my users it is crashing on these lines:
.ChangeFileAccess xlReadOnly
Kill .FullName
I was going to copy the message but it just suddenly stopped giving me this issue. Nothing changed but the issue is gone. Anybody have any ideas?