+ Reply to Thread
Results 1 to 9 of 9

open userform

  1. #1
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Brooklyn, NY
    MS-Off Ver
    Office 365
    Posts
    1,172

    open userform

    Hello.
    I'm a little stuck, I'm trying to prepare a chart for my office that should open a user-form when "Open Order Form" is selected from the drop-down menu which is located under column S but i keep getting a "Run-time error '424: Object required" message, and when i "debug" i get directed to "Userform1.show". I am not sure what the problem or where the problem is located.
    Here is my workbook uploaded OFFERS 2015.xlsm
    *I posted this problem earlier today but ran into some trouble because i accidentally posted a password protected workbook and had trouble uploading a new file.

  2. #2
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: open userform

    For some of the objects, you need to declare your variable. For example

    Please Login or Register  to view this content.

  3. #3
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Brooklyn, NY
    MS-Off Ver
    Office 365
    Posts
    1,172

    Re: open userform

    Hi.
    If you go into the sheets code you will see the following variables being publicly declared:
    Please Login or Register  to view this content.

  4. #4
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: open userform

    Hi kosherboy
    there are
    Please Login or Register  to view this content.
    but there are no CustBox11, CustBox12, PriceBox11, PriceBox12 on your form

    also
    it would be better if you declare global variables in a standard module (not in the sheet module)
    Last edited by nilem; 01-02-2015 at 01:15 PM.

  5. #5
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Brooklyn, NY
    MS-Off Ver
    Office 365
    Posts
    1,172

    Re: open userform

    You are a genius!
    Hats off to you!
    Thank you so much

  6. #6
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Brooklyn, NY
    MS-Off Ver
    Office 365
    Posts
    1,172

    Re: open userform

    Any reason why the debugger didn't identify the problem right away?

  7. #7
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Brooklyn, NY
    MS-Off Ver
    Office 365
    Posts
    1,172

    Re: open userform

    Quote Originally Posted by nilem View Post
    Hi kosherboy
    there are
    .......
    it would be better if you declare global variables in a standard module (not in the sheet module)
    Hi nilem,
    I'm marking this thread solved.
    if you can guide me as how i could set up the debugger to identify the problem directly, like any other vb project i have, that would be great.

    Thanks

    kosherboy.

  8. #8
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: open userform

    Hi kosherboy,
    considering your project, I just set a breakpoint (F9 can be used) on the first executable line of the UserForm_Initialize procedure. And then, step by step (using F8) went through the procedure and found the line where the error occurs.
    That's all
    If you have a macro that calls another macro, you can catch errors in 'another' macro using this method.

  9. #9
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Brooklyn, NY
    MS-Off Ver
    Office 365
    Posts
    1,172

    Re: open userform

    Ok, thanks for the tip

+ 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. Exit Userform to return to main code, but keep userform open
    By jombler74 in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 09-04-2014, 04:01 AM
  2. Replies: 1
    Last Post: 07-23-2014, 12:13 PM
  3. UserForm help - display list of open workbooks except workbook userform code is in
    By kensweep in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-09-2014, 12:26 PM
  4. [SOLVED] Open a userform from a userform, but preserve the info in the original userform
    By jfoerch in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-25-2013, 02:38 PM
  5. How to Open 2nd workbook from userform, then close 2nd Userform
    By bigfoot007 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-04-2012, 02:03 PM

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