View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Worksheet Code Too Large

That is very difficult to say without seeing the code, but in principle, you
need to identify a discreet block of code and move it into a separate macro
in a standard code module. When you do so, make sure you maintain a link to
the worksheet, which is implicit in the worksheet event code.

Then repeat the process until you can see no more.

You could also check to see whether there is any unnecessary code in the
procedures, or duplicated code that could be moved to a separate macro.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Paige" wrote in message
...
I'm sure this is a stupid question. I have Private Sub
Worksheet_SelectionChange(ByVal Target As Range) and Private Sub
Worksheet_Change(ByVal Target As Range) code in a worksheet object, but

the
module is too large. How do I divy this up? I know how to break the

other
'regular' modules up, but can't figure out how to do a worksheet object.