View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
NickHK NickHK is offline
external usenet poster
 
Posts: 4,391
Default How can I copy range's style to another in Excel?

Is this code in .Net or something ?
Because if it is supposed to be VBA, you do not want the ";" at the end of
the lines.

NickHK

"ZeroCool127" wrote in message
...
Hi everybody,

I have a problum that I selected a range on Excel worksheet, and inserted
another range on the same worksheet, now I wanna copy the selected range's
style to the inserted one, I use

insertedRange.Style = selectedRange.Style;

or

insertedRange.Cells.Style = selectedRange.Cells.Style;

both of the two works not correctly, what is the mistake?


--
If you enter this world knowing you are loved and leave this world knowing
the same, then everything that happens in between can be dealt with.