Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Program too large
I am having a problem with a macro that I am writing. Everytime I try
to run it it gives me an error. I think I can fix it using global variables. But now I keep getting an error saying invalid attribute. I have tried setting all variables = 0 then running it. Please help!!!! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Program too large
Give us more details on the error and when it happens.
AFAIK, there is limit of 64K (?) for the amount of code contained in a single module, although I see no reason to ever get that large. Split it into routines (sub/function) in modules/classes. How large is your code ? Right-click on the moduleExport, save somewhere suitable and check the size of the resultant file. NickHK wrote in message ups.com... I am having a problem with a macro that I am writing. Everytime I try to run it it gives me an error. I think I can fix it using global variables. But now I keep getting an error saying invalid attribute. I have tried setting all variables = 0 then running it. Please help!!!! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Program too large
You can try debugging your code and setting thru the program.
Some simple solutions are to use option explicit to check al lthe variables are spelt correctly. Generally attributes refer to incorrect items in function or procedure calls. Check the line where your code breaks down and make sure the code is correct. Do this with clicking debug and see where you are. -- Hope this helps Martin Fishlock Please do not forget to rate this reply. " wrote: I am having a problem with a macro that I am writing. Everytime I try to run it it gives me an error. I think I can fix it using global variables. But now I keep getting an error saying invalid attribute. I have tried setting all variables = 0 then running it. Please help!!!! |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Program too large
And the error is where ?
As a text file, it is ~56K, all in one routine, but it looks like you need to look at using arrays and process in a loop, then you would have a much shorter routine. Dim xData(1 to 36?) as long 'Then assign values for i=1 to 36 ....etc NickHK wrote in message ups.com... here is my code. I hope it isn't too large for this post. Sub sort_WC() Dim wscost As Worksheet Dim wscostsort As Worksheet Dim x As Long Dim lrow1 As Long Dim cnt As Long Dim xjan04 As Long Dim xfeb04 As Long Dim xmar04 As Long Dim xapr04 As Long Dim xmay04 As Long Dim xjun04 As Long Dim xjul04 As Long Dim xaug04 As Long ----------- CUT -------------- |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Program too large
I am getting the error when I run the macro. It says that the macro is too large. The reason I am I am using so many variables is because I want to keep the references to the lines after each sort so I can create a graph on a new sheet. I don't know much about arrays but I could try it if it will give me the same result. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Add-In Program | Excel Worksheet Functions | |||
Is there a way to unload the loaded XLL file in Excel? Hi all, I amdebugging XLL link library using Visual C++. Everytime I rebuild the XLL, Ihave to close the whole Excel program and relaunch the Excel program again,and then load in the newly gene | Excel Discussion (Misc queries) | |||
sum program | Excel Programming | |||
My Program | Charts and Charting in Excel | |||
merging excel program with tdc finance program | Excel Programming |