View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
Patrick Molloy[_2_] Patrick Molloy[_2_] is offline
external usenet poster
 
Posts: 1,298
Default Change formating in other sheet cell based on match condition

make sure that you have
OPTION EXPLICIT
at the top of the code module

DIM ws As WorkSheet
SET ws = Worksheets("sheet1")

now intellisense will work
when you type ws.




"Brandon" wrote:

For some reason the Worksheets object call isn't working. When I manually
type it, the tooltip popup appears showing me the syntax, but it doesn't
appear to have any attributes, i.e. Range(...) when I've typed
Worksheets("Sheet1")

There clearly is a MS Excel Object called Sheet1 in the VB editor IDE... Argh.

I tried, but none seem to work:

Worksheets("Sheet1")
Worksheets(Sheet1)
Worksheets(1)


"Patrick Molloy" wrote:
you can copy/pastespecial formats
thsi example copies the format from a range on sheet1 and format the same
size area to two other sheets...

Worksheets("sheet1").Range("B4:K17").Copy
Worksheets("Sheet2").Range("X1").PasteSpecial xlPasteFormats
Worksheets("Sheet3").Range("X1").PasteSpecial xlPasteFormats
Application.CutCopyMode = false