I need to know how i can lock formulas in certain columns. As of right now I have the code below to list things through an input box. In columns E9:E30,F9:F30,J9:J30, and K9;K30 I have a formula than needs to me locked. Is there anyway I can write in my code to lock it without a password?
Sub Energy()
Dim dblRow As Double, dtDate As Date, strProject As String
Dim strFalut As String, strProb As String, strSol As String
dblRow = InputBox("What Row to Enter On")
dtDate = InputBox("Date", , Date)
strTempIn = InputBox("Temp In")
strTempOut = InputBox("Temp Out")
strGPM = InputBox("GPM")
strAmp = InputBox("Amps")
strVolt = InputBox("Volts")
strPf = InputBox("PF")
Range("A" & dblRow).Value = dtDate
Range("B" & dblRow).Value = strTempIn
Range("C" & dblRow).Value = strTempOut
Range("D" & dblRow).Value = strGPM
Range("G" & dblRow).Value = strAmp
Range("H" & dblRow).Value = strVolt
Range("I" & dblRow).Value = strPf
End Sub
Sub Energy()
Dim dblRow As Double, dtDate As Date, strProject As String
Dim strFalut As String, strProb As String, strSol As String
dblRow = InputBox("What Row to Enter On")
dtDate = InputBox("Date", , Date)
strTempIn = InputBox("Temp In")
strTempOut = InputBox("Temp Out")
strGPM = InputBox("GPM")
strAmp = InputBox("Amps")
strVolt = InputBox("Volts")
strPf = InputBox("PF")
Range("A" & dblRow).Value = dtDate
Range("B" & dblRow).Value = strTempIn
Range("C" & dblRow).Value = strTempOut
Range("D" & dblRow).Value = strGPM
Range("G" & dblRow).Value = strAmp
Range("H" & dblRow).Value = strVolt
Range("I" & dblRow).Value = strPf
End Sub