View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
John[_88_] John[_88_] is offline
external usenet poster
 
Posts: 205
Default Changing a cell without selecting it

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

wrote in message
ups.com...
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