+ Reply to Thread
Results 1 to 10 of 10

Excel Ribbon dropdown

  1. #1
    Registered User
    Join Date
    04-13-2010
    Location
    Calgary, Canada
    MS-Off Ver
    Excel 2003
    Posts
    4

    Excel Ribbon dropdown

    I have customized a new tab on the ribbon, incorporating Ron de Bruin's dropdown XML and Vb code and it does work - I can select repeatedly from the dropdown and it takes the user choice and puts in cell B10. The info in B10 is used in a lookup with results in L10. The info in cell L10 is used by another macro that initiates a user form.
    Here is the problem - I can continue selecting from the dropdown with no problems UNTIL I run the macro that launches the user form that uses the info in L10. Once I have run that macro/userform I get an error in selecting from the dropdown
    Here is the dropdown Vb

    Please Login or Register  to view this content.
    Here is the "other" macro and userform (I have used ***** in this post to separate)



    Please Login or Register  to view this content.

    By no stretch of the imagination am I good at Vb but have got this far
    So the error I get is with the change handler for the dropdown
    Error 91, Object Variable or With Block Variable not set
    I have struggled for a couple of days (and nights) to solve this but am at a loss at to why the dropdown will continue to work after running every other macro but the one that uses related information. Any help would be GREATLY appreciated!
    thanks much
    Vonda
    PS this is a very large file and doubt I can email or attach
    Last edited by VWood; 04-13-2010 at 01:15 PM. Reason: trying to add code and end code

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Excel Ribbon dropdown

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here
    Hope that helps.

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

    Free DataBaseForm example

  3. #3
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,434

    Re: Excel Ribbon dropdown

    Does your userform use the END command at all. Maybe you are clearing all the variables by accident.

    I think you will have to attempt to post a cut down version of your workbook.
    I'm assuming it's large due to the data rather than the vba code and ribbonx.
    Cheers
    Andy
    www.andypope.info

  4. #4
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Excel Ribbon dropdown

    Both CommandButton Click events have an END statement in them which serves no purpose that I can see, so as Andy said, remove those and you should be OK.
    Remember what the dormouse said
    Feed your head

  5. #5
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,434

    Re: Excel Ribbon dropdown

    Thanks RS, I didn't see those End's in the code.

  6. #6
    Registered User
    Join Date
    04-13-2010
    Location
    Calgary, Canada
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Excel Ribbon dropdown

    THANK GUYS! that did solve the problem of not being able to continue using the dropdown - but then what code do I use with the commandButton clicks to close the forms?
    Again, HUGE thanks!

  7. #7
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Excel Ribbon dropdown

    Use:
    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    04-13-2010
    Location
    Calgary, Canada
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Excel Ribbon dropdown

    Hi Thanks romperstomper
    I really appreciate your continued help...
    unfortunately that gets me back to the original error - any other suggestions?

  9. #9
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Excel Ribbon dropdown

    You definitely have no End statements left? And the error is occurring in the same place? (did you restart the workbook?)

  10. #10
    Registered User
    Join Date
    04-13-2010
    Location
    Calgary, Canada
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Excel Ribbon dropdown

    Thanks romperstomper
    YIPPEE SKIPPEE!
    I missed a save in the process - all is working GREAT - thank you very much for your help and for your patience - I greatly appreciate it
    Vonda

+ 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