Reputation: 601
Could you guide me by saying that How can i Copy the color and Font and Style of an Cell say in Row#1? But not the content of the Cell.I wrote the below code but it gets copied all the above with First Cell data,which I wouldn't expect.
ob3.Range("A1").Copy
ob3.Range("A1").EntireRow.PasteSpecial(-4163) 'xlValues
Please guide here!
Thanks,
Upvotes: 0
Views: 258
Reputation: 14361
Try the follwing:
ob3.Range("A1").Copy
ob3.Range("A1").EntireRow.PasteSpecial (xlPasteFormats)
Application.CutCopyMode = False
I see Scott's point here :) Either you could set the number itself or use a const
to use this formattig via your sheet.
Const xlPasteFormats = -4122
Const xlPasteValues = -4163
ob3.Range("A1").Copy
ob3.Range("A1").EntireRow.PasteSpecial xlPasteFormats
Upvotes: 1