N
nnayak
Hi,
I have this code in the Worksheet/SheetCalculate event of my excel
sheet which was created in excel 2000. It works very well. However
when the same worksheet in opened in excel 2002 and a cell value
changed . It does not execute the function as the unprotect worksheet
code does not work in excel 2002.
Can anyone help me with this. This is my code which works well in excel
2000.
ActiveSheet.Unprotect
On Error GoTo ERRMSG
ActiveSheet.Shapes("SudhirP").Select
Selection.Cut
Range("d22:d36").Select
With Selection
..HorizontalAlignment = xlLeft
..VerticalAlignment = xlTop
..WrapText = True
..Orientation = 0
..AddIndent = False
..IndentLevel = 0
..ShrinkToFit = False
..MergeCells = False
End With
Range("d37").Select
ERRMSG:
Range("d22:d36").Select
With Selection
..HorizontalAlignment = xlLeft
..VerticalAlignment = xlTop
..WrapText = True
..Orientation = 0
..AddIndent = False
..IndentLevel = 0
..ShrinkToFit = False
..MergeCells = False
End With
ActiveSheet.Protect DrawingObjects:=False, Contents:=True,
Scenarios:=True
Range("a1").Select
thanks
Neeta
I have this code in the Worksheet/SheetCalculate event of my excel
sheet which was created in excel 2000. It works very well. However
when the same worksheet in opened in excel 2002 and a cell value
changed . It does not execute the function as the unprotect worksheet
code does not work in excel 2002.
Can anyone help me with this. This is my code which works well in excel
2000.
ActiveSheet.Unprotect
On Error GoTo ERRMSG
ActiveSheet.Shapes("SudhirP").Select
Selection.Cut
Range("d22:d36").Select
With Selection
..HorizontalAlignment = xlLeft
..VerticalAlignment = xlTop
..WrapText = True
..Orientation = 0
..AddIndent = False
..IndentLevel = 0
..ShrinkToFit = False
..MergeCells = False
End With
Range("d37").Select
ERRMSG:
Range("d22:d36").Select
With Selection
..HorizontalAlignment = xlLeft
..VerticalAlignment = xlTop
..WrapText = True
..Orientation = 0
..AddIndent = False
..IndentLevel = 0
..ShrinkToFit = False
..MergeCells = False
End With
ActiveSheet.Protect DrawingObjects:=False, Contents:=True,
Scenarios:=True
Range("a1").Select
thanks
Neeta