+ Reply to Thread
Results 1 to 8 of 8

UserForms Runtime error 91

  1. #1
    Registered User
    Join Date
    02-20-2017
    Location
    Hearst, Ontario, Canada
    MS-Off Ver
    2007
    Posts
    8

    UserForms Runtime error 91

    I am running three userforms.
    First one is for UnitModel.
    After pressing enter in the UnitModelBox, it is hidden and ProvForm is shown.

    After selecting a province, ProvForm is hidden and InsertDataForm is shown.

    In InsertDataForm, I have three command buttons. NEW PROVINCE to show ProvForm, NEW UNIT to show UnitModelBox and DONE to hide InsertDataForm.

    My problem is that I want to be able to unload all forms when clicking the Done button instead of hiding the InsertDataForm.

    I tried many different scenarios but always keep getting a runtime error '91'

    Then InsertDataForm.Show is highlighted in the ProvForm.

    Why?
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor ImranBhatti's Avatar
    Join Date
    03-27-2014
    Location
    Rawalpindi,Pakistan
    MS-Off Ver
    Office 365
    Posts
    1,784

    Re: UserForms Runtime error 91

    Have you tried after setting the showmodel property of the forms to "False"?
    Teach me Excel VBA

  3. #3
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,516

    Re: UserForms Runtime error 91

    Would it not be easier to setup a single multi page UserForm?

  4. #4
    Registered User
    Join Date
    02-20-2017
    Location
    Hearst, Ontario, Canada
    MS-Off Ver
    2007
    Posts
    8

    Re: UserForms Runtime error 91

    Hmmmm. I have never tried multi page Userforms but I do like the sound of that.
    Will give it a try.

  5. #5
    Registered User
    Join Date
    02-20-2017
    Location
    Hearst, Ontario, Canada
    MS-Off Ver
    2007
    Posts
    8

    Re: UserForms Runtime error 91

    Problem solved.

    thanks everybody

  6. #6
    Registered User
    Join Date
    02-20-2017
    Location
    Hearst, Ontario, Canada
    MS-Off Ver
    2007
    Posts
    8

    Re: UserForms Runtime error 91

    thanks. that did the trick. I changed the showmodel property to false inside the done button.

  7. #7
    Valued Forum Contributor ImranBhatti's Avatar
    Join Date
    03-27-2014
    Location
    Rawalpindi,Pakistan
    MS-Off Ver
    Office 365
    Posts
    1,784

    Re: UserForms Runtime error 91

    You are welcome.

  8. #8
    Valued Forum Contributor ImranBhatti's Avatar
    Join Date
    03-27-2014
    Location
    Rawalpindi,Pakistan
    MS-Off Ver
    Office 365
    Posts
    1,784

    Re: UserForms Runtime error 91

    Acknowledge the responses you receive, good or bad. If your problem is solved, please say so clearly, and mark your thread as Solved: Click Thread Tools above your first post, select "Mark your thread as Solved". Or click the Edit button on your first post in the thread, Click Go Advanced, select [SOLVED] from the Prefix dropdown, then click Save Changes. If more than two days have elapsed, the Dropdown option or Edit button will not appear -- ask a moderator to mark it.
    Don't forget to say thanks to one who helped you,by clicking the * button

+ 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. [SOLVED] Mac throwing error - Runtime Error 429 - ActiveX Component Can't Create Object
    By harman83 in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 11-28-2018, 11:04 PM
  2. Runtime error '1004': Paste special method of range class error.
    By Daryl Zer0 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 11-05-2014, 01:44 AM
  3. [SOLVED] VBA Error: Runtime Error 1004: AutoFilter method of Range class failed
    By jl22stac in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-03-2013, 07:27 PM
  4. runtime error 3265 error in a VBA Query to pull info from ERP Database
    By NBVC in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 05-12-2010, 03:59 PM
  5. Creating and removing Userforms at runtime
    By jerseyguy1996 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-28-2010, 12:33 PM
  6. Runtime errors loading userforms & hiding excel
    By Smurlos in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-10-2010, 09:27 AM
  7. Excel xmlHTTP object error message - system/runtime error
    By Porky2007 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-23-2007, 09:36 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