+ Reply to Thread
Results 1 to 10 of 10

User form Display issues

  1. #1
    Registered User
    Join Date
    12-21-2016
    Location
    Farnborough
    MS-Off Ver
    2016
    Posts
    7

    User form Display issues

    I have a user form which displays a list of options based on a named Range.

    in 2013 version of excel it works fine, however in the 2016 version it returns a Runtime error 91 object variable or With block variable not set.

    debug take me to my sub where it highlights userform.show vbModeless

    any help will be grateful

    regards

    Dave

  2. #2
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: User form Display issues

    What happens when you step through the code. Frequently that line is highlighted when the actual error is in the userform's code.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  3. #3
    Registered User
    Join Date
    12-21-2016
    Location
    Farnborough
    MS-Off Ver
    2016
    Posts
    7
    Quote Originally Posted by mikerickson View Post
    What happens when you step through the code. Frequently that line is highlighted when the actual error is in the userform's code.
    Hi Mikerickson

    Thanks for the reply.

    Stepping through works through the code with no problem, at the end when it suppose to display it then throws up the run time error

    I have also just checked that If I block out the code contained in the userform it displays with out a problem just no options

    I am a bit confused 🤔🤔🤔

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: User form Display issues

    Can you post the current code?
    If posting code please use code tags, see here.

  5. #5
    Registered User
    Join Date
    12-21-2016
    Location
    Farnborough
    MS-Off Ver
    2016
    Posts
    7

    Re: User form Display issues

    Thanks Everyone
    here is my Code:

    Please Login or Register  to view this content.
    Last edited by Vokesie; 03-02-2018 at 10:43 AM.

  6. #6
    Registered User
    Join Date
    12-21-2016
    Location
    Farnborough
    MS-Off Ver
    2016
    Posts
    7

    Re: User form Display issues

    I have since discovered that the problem appears to be in the bottom section of the code

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

    Re: User form Display issues

    It's not clear without seeing the file and all the code, where you're setting what "Xlist" actually is.
    You refer to it in the code but haven't actually set it within the code you've posted.

    BSB

  8. #8
    Registered User
    Join Date
    12-21-2016
    Location
    Farnborough
    MS-Off Ver
    2016
    Posts
    7

    Re: User form Display issues

    thank you your answer its self has solved it
    Last edited by Vokesie; 03-02-2018 at 12:48 PM.

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

    Re: User form Display issues

    Glad I could be of assistance

    BSB

  10. #10
    Registered User
    Join Date
    12-21-2016
    Location
    Farnborough
    MS-Off Ver
    2016
    Posts
    7
    Quote Originally Posted by BadlySpelledBuoy View Post
    Glad I could be of assistance

    BSB
    All works now,

    Well it did on my computer now I have loaded it on my works laptop which 80% of staff have and it appears that one of the VBA reference tools is missing (microsoft windows common controls 6.0 (sp6)) so not sure what I’m going to do now

+ 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. Issues with User Form
    By jennsmith88 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-17-2016, 12:42 AM
  2. Replies: 1
    Last Post: 05-27-2015, 01:31 PM
  3. User form code issues
    By JO505 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-16-2015, 03:50 PM
  4. Issues having more than one user update worksheets using VBA Form
    By llanusa in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-15-2012, 04:26 PM
  5. Form Load/Unload Display Issues
    By yellephant in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-02-2007, 09:34 AM
  6. help! user form issues; can't find subroutines; appearance issue
    By in-over-his-head-bill in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-06-2006, 05:30 PM
  7. User Form Initialize Event Issues
    By Randy in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-04-2005, 07:30 AM

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