+ Reply to Thread
Results 1 to 3 of 3

Userform error in custom ribbon

  1. #1
    Registered User
    Join Date
    01-29-2014
    Location
    ahmedabad
    MS-Off Ver
    Excel 2007
    Posts
    59

    Userform error in custom ribbon

    Hi friends,

    I created a custom ribbon (working with excel 2007) And want to open a userform on clickin the button in the ribbon but Everytime I do that, I get

    Run-time error '424':

    Object required

    Is there a way to solve this? The userform is in the new file vich opens and not in the ribbon (Is that why this error occurs? Coz I would prefer the userform on the file only instead of ribbon) . Here is the code i want to work (it works ok with command button inserted on file but doesnt work with ribbon):

    Please Login or Register  to view this content.
    I have a way out but its not so good. (I used inputbox in ribbon button for all the fields vich I want in userform but it doesnt luk quite gud).

    Kindly guide me regardin this error.

    Thanx a lot.....

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Userform error in custom ribbon

    I suspect that "UserForm1.Show" is NOT the actual line that is causing issues.
    You'll need to step through the code line by line (tap F8 when the UserForm.Show line is highlighted during debug) and see which line it eventually errors out at.

    Post that code and highlight the issue row. Or better still, post your workbook.

    BSB

  3. #3
    Registered User
    Join Date
    01-29-2014
    Location
    ahmedabad
    MS-Off Ver
    Excel 2007
    Posts
    59

    Re: Userform error in custom ribbon

    No that's d only code in action

    When I run the code, The target workbook opens i.e. the 1st line of code works ok. The 2nd line of code has to show userform1 but that part I get error with UserForm1.Show highlighted in yellow. The entire code works fine if i press command button on the file but gives error when I use it in ribbon.

    Attaching both the sample files here (xlam ribbon format not supported so i am posting it as xlsm. Kindly save it to xlam to use it as ribbon. Also xltm doesnt upload so I have changed the target file format to xlsm)
    Attached Files Attached Files
    Last edited by taralmehta15; 01-29-2016 at 06:19 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Put VBA ribbon together with Custom UI Editor Ribbon
    By czarlando in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-23-2016, 05:46 AM
  2. custom ribbon error running macro
    By PedalSteeler in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-30-2015, 04:17 PM
  3. Assistance with Custom Tab and Groups on Excel Office Ribbon using Custom UI Editor.
    By sdavison in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-15-2015, 06:13 AM
  4. [SOLVED] An alternative to the Add-Ins ribbon tab - Global Custom Ribbon Tab by Ken Puls
    By mc84excel in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-16-2014, 10:01 PM
  5. [SOLVED] Userform code fails when the userform is called from a custom ribbon button
    By klonbeck in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-14-2013, 03:00 PM
  6. [SOLVED] Disable buttons in custom ribbon before opening a vbModeless UserForm
    By heapifyman in forum Excel Programming / VBA / Macros
    Replies: 32
    Last Post: 01-14-2013, 12:38 PM
  7. Custom Ribbon Add-in
    By yawnzzzz in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-11-2011, 09:46 AM

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