J
josua
Hi to all,
I'm using this two command buttons:
Private Sub CommandButton1_Click()
ActiveSheet.Unprotect Password:="*****"
ActiveCell.Offset(1, 0).EntireRow.Insert
Dim c As Range
For Each c In Range(Cells(ActiveCell.Row, 1), Cells(ActiveCell.Row
256))
If Left(c.Formula, 1) = "=" Then
Range(c, c.Offset(1, 0)).FillDown
End If
Next c
ActiveSheet.Protect Password:="*****"
End Sub
Private Sub CommandButton2_Click()
ActiveSheet.Unprotect Password:="*****"
ActiveCell.Offset(0, 0).EntireRow.Delete
ActiveSheet.Protect Password:="*****"
End Sub
The problem is that I can't use "sort" Data>sort. When I manual
protect the sheet in Tools>Protection>Protectsheet (and check the sor
field in "allow all users in this worksheet to" everything is ok bu
when I use the command buttons to Insert or delete a row, the sor
field is gray ?? I'm using Excel2002.
Any help?
Thanks in advance
I'm using this two command buttons:
Private Sub CommandButton1_Click()
ActiveSheet.Unprotect Password:="*****"
ActiveCell.Offset(1, 0).EntireRow.Insert
Dim c As Range
For Each c In Range(Cells(ActiveCell.Row, 1), Cells(ActiveCell.Row
256))
If Left(c.Formula, 1) = "=" Then
Range(c, c.Offset(1, 0)).FillDown
End If
Next c
ActiveSheet.Protect Password:="*****"
End Sub
Private Sub CommandButton2_Click()
ActiveSheet.Unprotect Password:="*****"
ActiveCell.Offset(0, 0).EntireRow.Delete
ActiveSheet.Protect Password:="*****"
End Sub
The problem is that I can't use "sort" Data>sort. When I manual
protect the sheet in Tools>Protection>Protectsheet (and check the sor
field in "allow all users in this worksheet to" everything is ok bu
when I use the command buttons to Insert or delete a row, the sor
field is gray ?? I'm using Excel2002.
Any help?
Thanks in advance