VBA Clear Merged Cell Contents

uclc1922

New Member
Joined
Nov 1, 2012
Messages
15
Please help me with the bellow code, can some please edit so cell b3:c3 and b4:c4 need to be cleared when the button pressed.

Private Sub ResetFormButton_Click()
ActiveSheet.Unprotect
On Error Resume Next
[b3, b4, B5, b6, b7, b8, b15, b16, b26, b27, B28, B29, B31, e12, e16, f3, f4, f5, f6, f7, g15, g16, g19, g22, g23, g24, h3, h4, h5, h6, h7, i15, i16, i19, i20, i22, i23, I24].ClearContents
On Error GoTo 0
ActiveSheet.Protect AllowFiltering:=True
Range("i2").Select
End Sub


Thank you all in advance
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
the code below will unmerge the cells in the range b3:c4

Code:
Range("b3:c4").unmerge
 
Upvote 0

Forum statistics

Threads
1,215,412
Messages
6,124,761
Members
449,187
Latest member
hermansoa

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