I want to add a button to a sheet that, when clicked, will clear the values from Cells A5:A26. Can anyone assist?
I want to add a button to a sheet that, when clicked, will clear the values from Cells A5:A26. Can anyone assist?
Found it...
![]()
Private Sub CommandButton1_Click() Dim resp resp = MsgBox("Are you sure?", vbOKCancel) If resp = vbOK Then ActiveSheet.Range("A1").Value = Null End If End Sub
Google rocks
Hi,
Like this???
![]()
Try this:
![]()
Sub foo() Dim rng As Range Set rng = Range("A5:A26") rng.ClearContents End Sub
Alan עַם יִשְׂרָאֵל חַי
Change an Ugly Report with Power Query
Database Normalization
Complete Guide to Power Query
Man's Mind Stretched to New Dimensions Never Returns to Its Original Form
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks