Change text in a cell from a command button on a Userform

D

Derek

I am getting a runtime error 1004
I do realise that I am not addressing the cell correctly but cannot find out
how do do this.
I have 1 Sheet, 1 Userform and 1 module. My code (below) explains what I
want to do.
Any code to overcome this error would be greatly appreciated.

Private Sub CommandButton2_Click()

Sheets("sheet1").Range("K1").Text = "Off"

End Sub
 
J

JLGWhiz

The Text property is Read Only for the Range Object but is Read/Write for
everything else.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top