Locking formulas in a set of cells

justp90

New Member
Joined
Dec 17, 2012
Messages
5
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
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)

Forum statistics

Threads
1,215,461
Messages
6,124,954
Members
449,198
Latest member
MhammadishaqKhan

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top