Changing a cell without selecting it

F

fguyton

I'm a developer, but new to Excel coding. One thing that I can't
figure out... is there a way to change a cell without selecting it like
below?

Cells(curRow, 3).Select
With Selection.Interior
.ColorIndex = 36
.Pattern = xlSolid
End With

I don't want the cursor (cell selection box) jumping all over the
screen while I'm doing things behind the scene.

thanks,

fg
 
J

John

Hi fg,

You're virtually there with just the Cells object:

With Cells(curRow, 3).Interior
.ColorIndex = 36
.Pattern = xlSolid
End With

Likewise you can get and set a cell's value by Cell(r, c).Value = ....

Hope that helps.

Best regards

John
 

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