+ Reply to Thread
Results 1 to 5 of 5

Version change causing unwanted behaviour

  1. #1
    Registered User
    Join Date
    01-29-2007
    Posts
    92

    Version change causing unwanted behaviour

    I wrote a piece of code for my company about a year ago. This year i got a new laptop and the same piece of code is causing new behaviour. I ran the same code on an older desktop and it runs fine.

    In my workbook, the user selects an option from a drop-down menu. This triggers the ComboboxX_Click() code which calls a function stored in a module. In this function is the following line that i've isolated as the problem.

    Please Login or Register  to view this content.
    With the older version of Excel, this code executes and it moves on to the next line of code below and everything is well. In the new version, the code is executed as well, but it then goes back to the original ComboboxX_Click() code and causes the code to start all over and this inevitably causes an error somewhere down the line.

    I don't think the error is important, what i need to know is why the action of hiding these rows triggers the original ComboboxX_Click() code again. It may be imortant that the rows i'm hiding are part of the combobox ListFilRange which is set using a named range.

    Old Excel Version (Executes fine)
    Microsoft(R)Excel2002(10.6832.6830) SP3
    New Excel Version (Does not Execute properly)
    Microsoft(R)Excel(11.8169.8172) SP3

    Help greatly appreciated. Even a different command to hide rows may work if it behaves slightly different so if anyone knows of another line of code to hide rows, that may work as well.

    Cheers
    Schwizer

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    What versions of Excel are you referring to and what is the full combobox code code & function? Are any of the Edit options different in the workbook?
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    01-29-2007
    Posts
    92
    The excel versions i'm using are:

    Old Excel Version (Executes fine)
    Microsoft(R)Excel2002(10.6832.6830) SP3
    New Excel Version (Does not Execute properly)
    Microsoft(R)Excel(11.8169.8172) SP3

    If this isn't the version, then could you tell me how to check the version please. Also, i would prefer not to post all the code as i have about a dozend modules and hundreds of lines of code and several of them are called in this instance.

    About the edit settings, do these change the way the macro can behave on each local machine? because that would be a nightmare since every computer could potentially have different settings.

    Schwizer

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    I can't see anything in the line of code to affect the working.

  5. #5
    Registered User
    Join Date
    01-29-2007
    Posts
    92
    I seem to have found a temporary way around my problem but i think i may be playing with fire.

    In Tools-->Options-->Calculations I've changed the value to "Manual", and this stops the code from skipping back to the beginning, but now my basic cell formulas are not updating anymore. Is there a way to turn automatic calculating off while a macro is running only?

    Schwizer

+ 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