K
Kelvin Beaton
I have this macro.
-----------------------------------------------
Sub LockEm()
Dim Wk As Worksheet
For Each Wk In ActiveWorkbook.Worksheets
Wk.Protect ("password")
Next
End Sub
-----------------------------------------------
It protects all the sheets in my workbook. I want to add an additional
feature, but can't seem to get it to work.
I want the cursor to move the "B5" on each sheet along with protecting the
sheet.
I tried this....
+++++++++++++++++++++++++++++++
Sub LockEm()
Dim Wk As Worksheet
For Each Wk In ActiveWorkbook.Worksheets
Range("B5").Select
Wk.Protect ("password")
Next
End Sub
+++++++++++++++++++++++++++++++
and this....
+++++++++++++++++++++++++++++++
Sub LockEm()
Dim Wk As Worksheet
For Each Wk In ActiveWorkbook.Worksheets
Wk.Protect ("password")
Range("B5").Select
Next
End Sub
+++++++++++++++++++++++++++++++
But neither seem to work. What am I missing?
Would someone be so kind as to help me out?
Thanks
Kelvin
-----------------------------------------------
Sub LockEm()
Dim Wk As Worksheet
For Each Wk In ActiveWorkbook.Worksheets
Wk.Protect ("password")
Next
End Sub
-----------------------------------------------
It protects all the sheets in my workbook. I want to add an additional
feature, but can't seem to get it to work.
I want the cursor to move the "B5" on each sheet along with protecting the
sheet.
I tried this....
+++++++++++++++++++++++++++++++
Sub LockEm()
Dim Wk As Worksheet
For Each Wk In ActiveWorkbook.Worksheets
Range("B5").Select
Wk.Protect ("password")
Next
End Sub
+++++++++++++++++++++++++++++++
and this....
+++++++++++++++++++++++++++++++
Sub LockEm()
Dim Wk As Worksheet
For Each Wk In ActiveWorkbook.Worksheets
Wk.Protect ("password")
Range("B5").Select
Next
End Sub
+++++++++++++++++++++++++++++++
But neither seem to work. What am I missing?
Would someone be so kind as to help me out?
Thanks
Kelvin