+ Reply to Thread
Results 1 to 47 of 47

Client account Spreadsheet - Compile error - to large to need shorten code

  1. #1
    Registered User
    Join Date
    02-07-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    20

    Client account Spreadsheet - Compile error - to large to need shorten code

    Hi guys,

    i am no programmer. Our accountant wrote us an excell sheet to handle client money and up to 25 properties and now thats its full they want loads more cash just to make more sheets They know they have us over a barrel and are charging 3x the amount that we paid just for the spreadsheet in the first place. We are a small business and cant afford these costs

    I have been able to work out how to add more sheets and spent some time adding from 5 more sheets. This worked fine and my 30 property spreadsheet works. so i continued and added to 50 as we need them and boom

    The code works but now it says compile error. procedure to large. I would like someone to help us and do it for us. I don't mind paying even.

    I am hoping that you guys can make the code smaller for me for it to work. here is all of it. I am sure u gurus will understand it and can do it in 2 mins.

    here is the code https://gist.github.com/anonymous/4730171

    thanks for your help. We are a bit desperate as we cant function really without it.
    Last edited by spazem; 02-07-2013 at 08:39 AM.

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Help with code - very simple

    The code is not complicated, but requires a couple of hours work. I do not know what the issue with the code is, but some thing obvious is change the variable name "Integer" in to "Long". Integers could only cope with just over 32k rows, so it might be you are running out of memory. Go in the code, CTRL plus H, replace all Integers in to Long

  3. #3
    Registered User
    Join Date
    02-07-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Help with code - very simple

    i tried that.

    It says compile error Procedure to Large.

    I dont mind paying someone to do it and show us how to add more in future for ourselves.

  4. #4
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Help with code - very simple

    There are hundreds, if not thousands who are looking for a business in the net. I know a dozens people from this site. You can try Ozgrid site

  5. #5
    Registered User
    Join Date
    02-07-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Help with code - very simple

    any other sites?

  6. #6
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Help with code - very simple

    Google, words like excel experts or excel gurus, you are spolied for with choices

  7. #7
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Help with code - very simple

    It's pretty horrifying that people can get away with charging for code like that.

    Undoubtedly it will need some debugging, but I think this does the same thing, and is scalable to larger numbers of sheets without a huge hassle.

    Please Login or Register  to view this content.
    Obviously this is untested, so do make plenty of backup copies of your exiting data and code before trying it out.It's pretty horrifying that people can get away with charging for code like that.

    Undoubtedly it will need some debugging, but I think this does the same thing, and is scalable to larger numbers of sheets without a huge hassle.

    [code]Sub Button2_Click()

    Worksheets(

  8. #8
    Registered User
    Join Date
    02-07-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Help with code - very simple

    it says type mismatch.. I put values in all d12:bb12 but that didnt fix it..

    I am not a programmer at all

  9. #9
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Help with code - very simple

    Thanks for the positive feedback, but I've already spotted an error, which should be fixed in this version:

    Please Login or Register  to view this content.

  10. #10
    Registered User
    Join Date
    02-07-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Help with code - very simple

    NewRow = Worksheets("input").Range("D12:BB12") - Runtime errer 13 - type mismatch error .

    i put the starting values in D12-BB12 which i think is just so when it writes on the sheet next time it moves down a line to do the next.

  11. #11
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Help with code - very simple

    Andrew,
    Anyone can claim to be "Expert" nowdays, under the cover of the Net and charge people extortion amount of money. The accounting body, ACCA, runs daily courses and charges £1000 per day for simple excel task

  12. #12
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Help with code - very simple

    spazem,

    Please take a moment to read the forum rules and then amend your thread title to something descriptive of your problem. Once you have done this please send me a PM and I will remove this request.

    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  13. #13
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,448

    Re: Help with code - very simple

    Quote Originally Posted by arlu1201 View Post
    spazem,

    Please take a moment to read the forum rules and then amend your thread title to something descriptive of your problem. Once you have done this please send me a PM and I will remove this request.

    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.
    Couldn't agree more. Astonishing that members with more than 1000 posts don't even trouble themselves with, at least, abstaining from answering posts with bad titles.

  14. #14
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Help with code - very simple

    Pepe,
    Your post is likely directed at me. People generally ignore any plea from members, but listed to Moderators. How many times I have asked to use Code tags, but only to be ignored by OP and other members?

  15. #15
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Help with code - very simple

    Now that an admin has requested a title change I shall, of course, comply with rule #7 and refrain from posting further advice until the request has been complied with.

    Prior to that there's nothing in the rules to say I have to police titles.

  16. #16
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Help with code - very simple

    Quote Originally Posted by spazem View Post
    NewRow = Worksheets("input").Range("D12:BB12") - Runtime errer 13 - type mismatch error .
    Sorry, it's a really simple fix, but I can't give you the answer until you comply with the request to re-title the thread. Instructions on how to do this are in Arlu1201's post.

  17. #17
    Registered User
    Join Date
    02-07-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Help with code - very simple

    i am trying to find out how to do it

  18. #18
    Registered User
    Join Date
    02-07-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Client account Spreadsheet - Compile error - to large to need shorten code

    did it i think

  19. #19
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Client account Spreadsheet - Compile error - to large to need shorten code

    You did, thank you.

    Now that we're square with the mods this line:

    Please Login or Register  to view this content.
    Which is right at the start of the code, needs to be changed to:

    Please Login or Register  to view this content.

  20. #20
    Registered User
    Join Date
    02-07-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Client account Spreadsheet - Compile error - to large to need shorten code

    now it says Application defined or object defined error for this codeError 1004
    Please Login or Register  to view this content.

  21. #21
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Client account Spreadsheet - Compile error - to large to need shorten code

    See, I told you there'd be some debugging to do

    Is there any chance you can let me have a copy of your workbook? It's going to be much quicker for me to be able to run the macro and debug it, rather than having to go through it line-by-line with you.

  22. #22
    Registered User
    Join Date
    02-07-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Client account Spreadsheet - Compile error - to large to need shorten code

    i pmessaged you. thanks

  23. #23
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Client account Spreadsheet - Compile error - to large to need shorten code

    spazem,

    Its against forum rules to PM files to any user of the forum. Follow the steps below to attach a file -

    1. Click on Go Advanced
    2. In the frame Attach Files you will see the button Manage Attachments
    3. Click the button.
    4. A new window will open titled Manage Attachments - Excel Forum.
    5. Click the Browse... button to locate your file for uploading.
    6. This will open a new window File Upload.
    7. Once you have located the file to upload click the Open button. This window will close.
    8. You are now back in the Manage Attachments - Excel Forum window.
    9. Click the Upload button and wait until the file has uploaded.
    10. Close the window and then click Submit.

  24. #24
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Client account Spreadsheet - Compile error - to large to need shorten code

    Quote Originally Posted by arlu1201 View Post
    Its against forum rules to PM files to any user of the forum.
    Really? Then you should add that to the list of rules.

    As it is I'm happy to confirm that no file has been PM'd to me.

  25. #25
    Registered User
    Join Date
    02-07-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Client account Spreadsheet - Compile error - to large to need shorten code

    i never knew u could pm a file....

    I did pm a message. Am i not supposed to do that to? why have that function then?

  26. #26
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,448

    Re: Client account Spreadsheet - Compile error - to large to need shorten code

    Quote Originally Posted by Andrew-R View Post
    Really? Then you should add that to the list of rules.

    As it is I'm happy to confirm that no file has been PM'd to me.
    It's already there, rule nr 4 - Has always been

  27. #27
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Client account Spreadsheet - Compile error - to large to need shorten code

    For the benefit of other users facing the same question as you, you should not send a file via email. Instead it should be uploaded on the thread.

    You are not doing anything wrong by sending PMs.

    So now, lets close the loop on this discussion and proceed with solving the question at hand.

  28. #28
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Client account Spreadsheet - Compile error - to large to need shorten code

    Quote Originally Posted by Pepe Le Mokko View Post
    It's already there, rule nr 4 - Has always been
    Except that rule 4 does not, in any way, say that a file can't be PM'd to members (I'm not even sure you can PM files).

    Given the state of the forum right now I'd expect the admins to have better things to do than apply wild redefinitions of rules to threads where people are, you know, trying to help posters with Excel problems.

  29. #29
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Client account Spreadsheet - Compile error - to large to need shorten code

    Andrew,

    No one is stopping you from helping the OP. But since the OP is a newbie, i thought it necessary to guide them about the workings of the forum. Whats the use of sending a file via PM / Email (though i am sure its not possible via PM) if it does not help other users facing the same issue?

    Also, regarding the forum issues, a notice is already up and the tech team are already working on monitoring it for any other outages.

  30. #30
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Client account Spreadsheet - Compile error - to large to need shorten code

    Anyway, made-up rules aside, here's my revised code for this:

    Please Login or Register  to view this content.
    The original file was never PM'd to me (because that's against the imaginary rules and also impossible), so any mythical future people with the same problem, who desperately need to work out if their file is in the same format as the OP's, will have to do what I did and deduce the layout of the file from the code.

  31. #31
    Registered User
    Join Date
    02-07-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Client account Spreadsheet - Compile error - to large to need shorten code

    wow... it works nearlty perfect but still one problem.

    When it writes to the sheet after you input it needs to be the other way round. When it credits a sheet it actually needs to go into the sheet as a - and vice versa.. becasue the sheets themselves need to balance against the cashbook sheet if you know what i mean. Can we just change from + to - when it writes on the sheet for a property.. then its perfect

  32. #32
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,448

    Re: Client account Spreadsheet - Compile error - to large to need shorten code

    Quote Originally Posted by Andrew-R View Post
    Except that rule 4 does not, in any way, say that a file can't be PM'd to members (I'm not even sure you can PM files).
    No you're probably right, and the underlying idea of the rule is probably a bit hard for you to catch.

  33. #33
    Registered User
    Join Date
    02-07-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Client account Spreadsheet - Compile error - to large to need shorten code

    this guy has gone out of his way to help me and all you guys cant stop giving him a hard time. Without him i would have been in nowhere land. Please let him help me in peace.. Has has potentially today saved our business 1k a year in fees to keep updating our spreadsheet. he is a hero !!!!!

  34. #34
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Client account Spreadsheet - Compile error - to large to need shorten code

    Quote Originally Posted by Pepe Le Mokko View Post
    the underlying idea of the rule is probably a bit hard for you to catch.
    Well, I normally save ad hominem attacks until later in the evening, but if you're ready to go there now then that's fine.

  35. #35
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Client account Spreadsheet - Compile error - to large to need shorten code

    Quote Originally Posted by spazem View Post
    When it writes to the sheet after you input it needs to be the other way round. When it credits a sheet it actually needs to go into the sheet as a - and vice versa.. becasue the sheets themselves need to balance against the cashbook sheet if you know what i mean. Can we just change from + to - when it writes on the sheet for a property.. then its perfect
    I'm still a bit in the dark as to the actual sheet format, but is this any closer?

    Please Login or Register  to view this content.

  36. #36
    Registered User
    Join Date
    02-07-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Client account Spreadsheet - Compile error - to large to need shorten code

    It sys type mismatch for

    Please Login or Register  to view this content.

  37. #37
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Client account Spreadsheet - Compile error - to large to need shorten code

    Ah, I haven't got your workbook, so I just put numeric values into all of the cells that are being moved around.

    On the P sheets values are written to columns B-H, if you just let me know which of those columns need to be multiplied by -1 then I'll sort it.

  38. #38
    Registered User
    Join Date
    02-07-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Client account Spreadsheet - Compile error - to large to need shorten code

    i believe the H coloum needs to be multiplied by -1

  39. #39
    Registered User
    Join Date
    02-07-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Client account Spreadsheet - Compile error - to large to need shorten code

    dont need to multiply it.. i found the problem. Whatever is going getting inputed into the G colum need to actually go in the F coloum and vice versa on the sheets. Thats the only problem.

  40. #40
    Registered User
    Join Date
    02-07-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Client account Spreadsheet - Compile error - to large to need shorten code

    Dont even worry mate.. I just swapped the name of my input credit and debt boxes around. This was it works out fine.. WORKING 100%
    I just got to get used to entering them in different boxes. Shouldnt take long hehehehe..

    thanks so much mate

  41. #41
    Registered User
    Join Date
    02-07-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Client account Spreadsheet - Compile error - to large to need shorten code

    such a superstar !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

  42. #42
    Registered User
    Join Date
    02-07-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Client account Spreadsheet - Compile error - to large to need shorten code

    ok i still have a problem. Cause i inversed the entrys the sheets for each proeprty aer right but the cashbook sheet is wrong. The value in h has to be multiplied by -1. Thanks

  43. #43
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Client account Spreadsheet - Compile error - to large to need shorten code

    So, just column H in the cashbook to be multiplied by -1.

    This should do the trick...

    Please Login or Register  to view this content.

  44. #44
    Registered User
    Join Date
    02-07-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Client account Spreadsheet - Compile error - to large to need shorten code

    i have no idea whats happened now. The first entry in the cashbook was perfect. I put in a credit of 3000 then when i put the second credit it actually minused it from total when it should have added it.

    Here is what it looks like

    CLIENT CASH BOOK
    Trans Date Property Ref Details DR CR Balance
    No Ref
    1 31/07/2012 1 Test Flat Tenancy Deposit 3,000.00 3,000.00
    2 01/08/2012 1 Test Flat Rent Received 2,166.67 -833.33


    the second extry should have made it 5166.67. On the p1 sheet is right but not on this cashbook..

    hope this makes sense to you. thanks again

  45. #45
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Client account Spreadsheet - Compile error - to large to need shorten code

    Strange, as I'm pretty sure I've duplicated everything that was in the original code.

    Anyway, give this a try:

    Please Login or Register  to view this content.

  46. #46
    Registered User
    Join Date
    02-07-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Client account Spreadsheet - Compile error - to large to need shorten code

    I fixed it. I have been trying every combinatoin i can think but this is all it took;

    Please Login or Register  to view this content.
    ur still a legend in my books. Thanks for all your hard work. My spreadsheet finally works
    Last edited by spazem; 02-08-2013 at 05:28 AM.

  47. #47
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Client account Spreadsheet - Compile error - to large to need shorten code

    Nice one!

    You may want to edit your post, as you appear to have your actual sheet password in there

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1