Hi All,
I have a private sub on "ThisWorkbook" object that works fine on my pc but doesn't on other computers. This sub should "undo" some steps in excel when "Paste" event is found in the undo list. The two computers run the excel on the same network and the office version is the same.
I've checked the enable events settings on other computers and it is set to TRUE. To be sure I've also put a private for enabling events.
The problem sill persists. Do you have any idea on what to look for solving this issue? I've found many discussions regarding this problem but never found a real solution.
Thank you in advance for your time.
Bye
Maurizio
I have a private sub on "ThisWorkbook" object that works fine on my pc but doesn't on other computers. This sub should "undo" some steps in excel when "Paste" event is found in the undo list. The two computers run the excel on the same network and the office version is the same.
VBA Code:
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Dim UndoString As String
Dim srce As Range
On Error GoTo err_handler
UndoString = Application.CommandBars("Standard").Controls("&Undo").List(1)
If Left(UndoString, 5) <> "Paste" And UndoString <> "Auto Fill" Then
Exit Sub
End If
Application.ScreenUpdating = False
Application.EnableEvents = False
Application.Undo
If UndoString = "Paste" Then
Target.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End If
Application.ScreenUpdating = True
Application.EnableEvents = True
Exit Sub
err_handler:
Application.ScreenUpdating = True
Application.EnableEvents = True
End Sub
I've checked the enable events settings on other computers and it is set to TRUE. To be sure I've also put a private for enabling events.
VBA Code:
Private Sub Workbook_Open()
Application.CellDragAndDrop = False
Application.EnableEvents = True
End Sub
The problem sill persists. Do you have any idea on what to look for solving this issue? I've found many discussions regarding this problem but never found a real solution.
Thank you in advance for your time.
Bye
Maurizio