Deleting Cell Contents Leave Code

ryderlane

New Member
Joined
Nov 2, 2018
Messages
7
Hello All!

I'm using this code to delete contents in a Cell

Private Sub CommandButton2_Click()

Sheets("Calculator").Range("K3").Value = "$0"

End Sub

How do I keep the Formula in Excel from deleting every time I hit the "Clear Button"?

Thank you!
 
Thank you,

I have 2 Cells (Pump Pricing $) & (VFD Pricing $) that populate pricing once an option is selected in a Drop Down called (System Pump), the 2 options are (5m & 10m) that populate different pricing in each cell. I'd like to add 2 more options in the drop down With a (5m No VFD, 10m No VFD) this would only remove the pricing in the (VFD Pricing $) Cell and keep the pricing in the (Pump Pricing $) Cell.

Can this be done?

Thank you again for the help

"
"
 
Upvote 0

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.

Forum statistics

Threads
1,223,896
Messages
6,175,265
Members
452,627
Latest member
KitkatToby

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