Thread: Reset Button
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default Reset Button

Second range has two colons A12::D15

Drop one of them.


Gord Dibben MS Excel MVP

On Wed, 26 Nov 2008 12:39:09 -0800, Raz
wrote:

thanks Gary, I am very new to this.
Sorry I couldn't make it work, did something wrong, its resetting my first
range but not doing the 2nd one.

getting an error message saying.

Run time error '1004'
method 'range' of object '_Global' Failed

I was testing it in a separete spreadsheet using this

Sub Button1_Click()
Range("A1:D10").Clear
Range("A12::D15").Clear
End Sub

A1 to D10 worked but showing an error and 2nd range turns yellow in the VB
window.




"Gary''s Student" wrote:

Place the button on your sheet and assign this macro to it:

Sub raz()
Range("B8:T9").Clear
Range("B11:T51").Clear
End Sub
--
Gary''s Student - gsnu200816


"Raz" wrote:

Please help how to create and use macro codes for a Button. (never used macro
before)

need a button in cell T4 and
need these cells (below) to reset to blank when button clicked

B8 to T8
B9 to T9
B11 to T11
B12 to T12
B14 to T14
B15 to T15
B17 to T18
...........
..........
B51 to T51


Thanks