lezawang
Well-known Member
- Joined
- Mar 27, 2016
- Messages
- 1,805
- Office Version
- 2016
- Platform
- Windows
Hi
I want to fill the whole worksheet with "hello" or with a number like 1
I wrote the code below. It is only working if
x.Value = "" (clearing the sheet)
but when I type
x.Value = "hello"
or x.Value= 1
I got error message. Any idea how to fix that. Thank
+++++++++++++++
Private Sub CommandButton3_Click()
Dim x As Range
Set x = Worksheets("sheet1").Cells
x.Value = ""
End Sub
I want to fill the whole worksheet with "hello" or with a number like 1
I wrote the code below. It is only working if
x.Value = "" (clearing the sheet)
but when I type
x.Value = "hello"
or x.Value= 1
I got error message. Any idea how to fix that. Thank
+++++++++++++++
Private Sub CommandButton3_Click()
Dim x As Range
Set x = Worksheets("sheet1").Cells
x.Value = ""
End Sub
Last edited: