View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
lallen lallen is offline
external usenet poster
 
Posts: 17
Default moved code to new book - some doesn't work now

I recently moved all the code from one workbook to another so that it could
be shared amont multiple books, by making the following change in the
worksheet_activate sub in Sheet1:

from Call Macro1
to Application.Run "'Book2'!Macro1"

Now, some of the code works, and some doesn't. For example:

With Worksheets("Sheet1")
.Columns("A:I").ClearContents ' does nothing
.Cells(10,3) = "Title1" ' works
End With

What am I doinf wrong?