![]() |
Module Limits
I do a lot of VB programming in the modules, which take data from a
spreadsheet, perform a calcualtion and write the answer back to the spreadsheet. I have a lot of code in a number of modules. At a certain point, when I add code to a module, it stops working. Moving the code to another module ususally corrects the problem. My question: Is there a limit on the number or size of each module? |
Module Limits
There is no hard limit on the number of lines of code in a
module, but the compiled size of the code in the module must be less than 64K. I tend to keep modules less than about 3K lines of code. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Richard Weatherly" <Richard wrote in message ... I do a lot of VB programming in the modules, which take data from a spreadsheet, perform a calcualtion and write the answer back to the spreadsheet. I have a lot of code in a number of modules. At a certain point, when I add code to a module, it stops working. Moving the code to another module ususally corrects the problem. My question: Is there a limit on the number or size of each module? |
Module Limits
Thanks for the info, Chip.
How do you know how much the compiled size is? "Chip Pearson" wrote: There is no hard limit on the number of lines of code in a module, but the compiled size of the code in the module must be less than 64K. I tend to keep modules less than about 3K lines of code. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Richard Weatherly" <Richard wrote in message ... I do a lot of VB programming in the modules, which take data from a spreadsheet, perform a calcualtion and write the answer back to the spreadsheet. I have a lot of code in a number of modules. At a certain point, when I add code to a module, it stops working. Moving the code to another module ususally corrects the problem. My question: Is there a limit on the number or size of each module? |
Module Limits
Unfortunately, there is no way to determine the size of a module,
other than number of lines of code. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Richard Weatherly" wrote in message ... Thanks for the info, Chip. How do you know how much the compiled size is? "Chip Pearson" wrote: There is no hard limit on the number of lines of code in a module, but the compiled size of the code in the module must be less than 64K. I tend to keep modules less than about 3K lines of code. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Richard Weatherly" <Richard wrote in message ... I do a lot of VB programming in the modules, which take data from a spreadsheet, perform a calcualtion and write the answer back to the spreadsheet. I have a lot of code in a number of modules. At a certain point, when I add code to a module, it stops working. Moving the code to another module ususally corrects the problem. My question: Is there a limit on the number or size of each module? |
Module Limits
Chip,
Two ideas on module size that I have used - please advise if these are not as effective as I had thought; 1. Export the module and view the file size using Windows Explorer 2. VBE Tools 2.0 Add-In from Office Automation (http://www.oaltd.co.uk ) has a module size indicator in its toolbar. Alex J "Chip Pearson" wrote in message ... Unfortunately, there is no way to determine the size of a module, other than number of lines of code. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Richard Weatherly" wrote in message ... Thanks for the info, Chip. How do you know how much the compiled size is? "Chip Pearson" wrote: There is no hard limit on the number of lines of code in a module, but the compiled size of the code in the module must be less than 64K. I tend to keep modules less than about 3K lines of code. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Richard Weatherly" <Richard wrote in message ... I do a lot of VB programming in the modules, which take data from a spreadsheet, perform a calcualtion and write the answer back to the spreadsheet. I have a lot of code in a number of modules. At a certain point, when I add code to a module, it stops working. Moving the code to another module ususally corrects the problem. My question: Is there a limit on the number or size of each module? |
Module Limits
You should also get Rob Bovey's VBA Code Cleaner at www.appspro.com
-- Robin Hammond www.enhanceddatasystems.com "Alex J" wrote in message . .. Chip, Two ideas on module size that I have used - please advise if these are not as effective as I had thought; 1. Export the module and view the file size using Windows Explorer 2. VBE Tools 2.0 Add-In from Office Automation (http://www.oaltd.co.uk ) has a module size indicator in its toolbar. Alex J "Chip Pearson" wrote in message ... Unfortunately, there is no way to determine the size of a module, other than number of lines of code. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Richard Weatherly" wrote in message ... Thanks for the info, Chip. How do you know how much the compiled size is? "Chip Pearson" wrote: There is no hard limit on the number of lines of code in a module, but the compiled size of the code in the module must be less than 64K. I tend to keep modules less than about 3K lines of code. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Richard Weatherly" <Richard wrote in message ... I do a lot of VB programming in the modules, which take data from a spreadsheet, perform a calcualtion and write the answer back to the spreadsheet. I have a lot of code in a number of modules. At a certain point, when I add code to a module, it stops working. Moving the code to another module ususally corrects the problem. My question: Is there a limit on the number or size of each module? |
All times are GMT +1. The time now is 06:23 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com