Question : Password for run the macro

Hi,

I need Experts help. How to set a password to run the attached macro. This to prevent user accidently run this macro. Hope experts can help me to add this feature.  


1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
Sub clearData()
'Clear data macro created by Andrew Swingewood (16/07/2010)
Dim MySheets
Dim i As Long
Dim j As Long
Dim r As Long

MySheets = Array("CH1", "Ch2", "CH3", "CH4", "CH5", "CH6", "CH7", "CH8", "CH9", "CH10", "CH11", "CH12")
For i = 0 To 11
    For j = 2 To 22
        If (IsNumeric(Sheets(MySheets(i)).Cells(j, 1)) And (Sheets(MySheets(i)).Cells(j, 1) <> 0)) Then
            For r = 2 To 9
                Sheets(MySheets(i)).Cells(j, r) = ""
            Next r
        End If
    Next j
Next i
End Sub

Answer : Password for run the macro

Solved the problem by updating the paydata text file and removing the .usr files in the same directory
Random Solutions  
 
programming4us programming4us