+ Reply to Thread
Results 1 to 16 of 16

runtime error 16 - expression too complex

  1. #1
    Registered User
    Join Date
    09-05-2012
    Location
    NYC
    MS-Off Ver
    Office 2010
    Posts
    10

    Lightbulb runtime error 16 - expression too complex

    Hello All

    i'm a newby here
    but not really to excel

    i just got a spreadsheet with VBA in it

    it works fine on a XP with Excel 2003

    i copied the file onto a USB and try to run it on Win7 with Office 2010, it gives me the runtime error 16


    Please Login or Register  to view this content.
    if there is more code needed, please let me know
    Last edited by JBeaucaire; 11-29-2012 at 04:43 PM. Reason: Added code tags, as per forum rules. Don't forget!

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2404
    Posts
    24,758

    Re: runtime error 16 - expression too complex

    What range does "guage_spec1" refer to? What data or formulas are in that range? Can you post your file? I have not seen failures in 2007 that work in 2003, and I am not familiar with this particular error, so this may need a little detective work.

    Also I think you have misspelled "gauge".
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    09-05-2012
    Location
    NYC
    MS-Off Ver
    Office 2010
    Posts
    10

    Re: runtime error 16 - expression too complex

    i hope it worked with attaching the file

    i'm using a Win 7 and Office 2010


    the xl-sheet ran on a Win XP with Office 2003
    Attached Files Attached Files

  4. #4
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: runtime error 16 - expression too complex

    I'm not real sure why it fails but you can replace your select case with an if...elseif...end if and it works fine
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  5. #5
    Registered User
    Join Date
    09-05-2012
    Location
    NYC
    MS-Off Ver
    Office 2010
    Posts
    10

    Re: runtime error 16 - expression too complex

    Quote Originally Posted by JosephP View Post
    I'm not real sure why it fails but you can replace your select case with an if...elseif...end if and it works fine
    can you explain, please

  6. #6
    Registered User
    Join Date
    09-05-2012
    Location
    NYC
    MS-Off Ver
    Office 2010
    Posts
    10

    Re: runtime error 16 - expression too complex

    Quote Originally Posted by JosephP View Post
    I'm not real sure why it fails but you can replace your select case with an if...elseif...end if and it works fine
    can you explain, please

  7. #7
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: runtime error 16 - expression too complex

    instead of
    Please Login or Register  to view this content.
    use
    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    09-05-2012
    Location
    NYC
    MS-Off Ver
    Office 2010
    Posts
    10

    Re: runtime error 16 - expression too complex

    didn't work


    i have no idea where the issue is
    i'm playing around and back and forth
    nothing

  9. #9
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: runtime error 16 - expression too complex

    it does work for me. what actual code did you use and what happened?

  10. #10
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,169

    Re: runtime error 16 - expression too complex

    Is your named range of "gauge_spec1" a single dimension range? I don't think you can use a range that is a rectangular array/range.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  11. #11
    Registered User
    Join Date
    09-05-2012
    Location
    NYC
    MS-Off Ver
    Office 2010
    Posts
    10

    Re: runtime error 16 - expression too complex

    see the file, i uploaded it

  12. #12
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,169

    Re: runtime error 16 - expression too complex

    Look at http://www.ozgrid.com/VBA/select-case.htm and see that all the things after "CASE" are static. You have a variable in your code.

    I'd go with JosephP and convert the case to If Then construct.

  13. #13
    Registered User
    Join Date
    09-05-2012
    Location
    NYC
    MS-Off Ver
    Office 2010
    Posts
    10

    Re: runtime error 16 - expression too complex

    is there any change to give me hand how to wright this

    i have a huge blockage right now and my head is with estimating
    have two huge jobs to price out and i need this sheet to calculate the amount of sheetmetal for duct work

  14. #14
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: runtime error 16 - expression too complex

    corrected code
    Please Login or Register  to view this content.

  15. #15
    Registered User
    Join Date
    09-05-2012
    Location
    NYC
    MS-Off Ver
    Office 2010
    Posts
    10

    Re: runtime error 16 - expression too complex

    Thank you a thousand times JosephP

    it works - of course
    u saved my day

    Happy Holidays

  16. #16
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: runtime error 16 - expression too complex

    you're welcome :-)

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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