Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 270
Default Worksheet Code Too Large

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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
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.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Printing a large worksheet Dave Excel Worksheet Functions 1 September 9th 09 10:00 AM
Sorting large worksheet Sidmyboy Excel Discussion (Misc queries) 2 January 17th 09 10:05 PM
I have a large worksheet keep getting error OLE.APP Help AJO Excel Programming 0 October 18th 04 05:05 PM
monitor small/large font code Tom Rudski[_2_] Excel Programming 7 April 21st 04 11:03 PM
Attaching a JET database to an Excel Worksheet OR storing large binary data in a worksheet Ant Waters Excel Programming 1 September 3rd 03 11:34 AM


All times are GMT +1. The time now is 05:45 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"