none
UserForm not Appearing in Project Explorer RRS feed

  • Question

  • So I recently started on a project where I decided that an InputBox wasn't sufficient for user input and wanted to learn UserForms, but I can't get it to show up. It looks like I'm just supposed to click Insert > UserForm from the VBE, but nothing shows up when I do. I can insert Modules and Class Modules just fine, but the UserForm button doesn't do anything that I can see. I feel like I'm probably missing something obvious. Is there any option where it might be hidden in some way? Or maybe something I need to enable first?
    Monday, November 20, 2017 4:07 PM

Answers

  • Hi Mixttime,

    from your description , I can understand that when you add the userform it is not displaying in the project explorer.

    I want to confirm with you that, is userform get added or not?

    is it like userform is there but only not listed in the project explorer? or when you try to insert the userform, nothing get happen?

    to verify the same you can try to add userform and then try to open that userform from module like below.

    Sub demo()
    UserForm1.Show
    End Sub

    so that we can know userform is exist or not.

    other way is to display the list of userforms you have in your project.

    Sub ListForms()
         
        Dim x As String
        Dim vbc As VBIDE.VBComponent
        For Each vbc In ThisWorkbook.VBProject.VBComponents
            If vbc.Type = vbext_ct_MSForm Then
                Debug.Print vbc.Name
                x = x & vbCr & vbc.Name
            End If
        Next vbc
        If x = "" Then
            MsgBox "No UserForms created."
            Exit Sub
        End If
        MsgBox x
         
    End Sub
    

    I suggest you to create a new workbook and try to reproduce the issue. to check whether the issue is related at application level or it is limited to specific workbook.

    if it is limited to specific workbook then try to move all the data and code from problematic workbook to new workbook may solve your issue.

    if problem is at application level then you can try to reinstall the Office Suite.

    it is possible that you can find the same issue in other office applications like Word, PowerPoint etc.

    so it is better to reinstall the Office suite to remove any kind of corruption.

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Wednesday, November 22, 2017 9:32 AM
    Moderator

All replies

  • Hi Mixttime,

    What's the version of your office? Have you try to repair or update your office to latest version and then do this work again? If you create a Workbook with UserForms in other computer and then open it in your current computer, could you see the UserForm in VBE?

    Best Regards,

    Terry


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Tuesday, November 21, 2017 2:42 AM
  • Hi Mixttime,

    from your description , I can understand that when you add the userform it is not displaying in the project explorer.

    I want to confirm with you that, is userform get added or not?

    is it like userform is there but only not listed in the project explorer? or when you try to insert the userform, nothing get happen?

    to verify the same you can try to add userform and then try to open that userform from module like below.

    Sub demo()
    UserForm1.Show
    End Sub

    so that we can know userform is exist or not.

    other way is to display the list of userforms you have in your project.

    Sub ListForms()
         
        Dim x As String
        Dim vbc As VBIDE.VBComponent
        For Each vbc In ThisWorkbook.VBProject.VBComponents
            If vbc.Type = vbext_ct_MSForm Then
                Debug.Print vbc.Name
                x = x & vbCr & vbc.Name
            End If
        Next vbc
        If x = "" Then
            MsgBox "No UserForms created."
            Exit Sub
        End If
        MsgBox x
         
    End Sub
    

    I suggest you to create a new workbook and try to reproduce the issue. to check whether the issue is related at application level or it is limited to specific workbook.

    if it is limited to specific workbook then try to move all the data and code from problematic workbook to new workbook may solve your issue.

    if problem is at application level then you can try to reinstall the Office Suite.

    it is possible that you can find the same issue in other office applications like Word, PowerPoint etc.

    so it is better to reinstall the Office suite to remove any kind of corruption.

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Wednesday, November 22, 2017 9:32 AM
    Moderator
  • demo() errors out and ListForms() returned with no UserForms even in a clean file. So safe to say they just don't exist. And I tested again in Word and still got nothing. So I think I'm going to need to get IT to reinstall Office. That's going to suck. Thanks for your help though.
    • Edited by Mixttime Wednesday, November 22, 2017 4:00 PM
    Wednesday, November 22, 2017 2:50 PM
  • I'm running Office 2010 Standard (14.0.7190.5000 32-bit)

    I just tested and if I make a UserForm from a coworkers computer and send it back to mine, then Excel crashes when I open the VBE. Next step looks like trying to get IT to repair the install.

    Wednesday, November 22, 2017 3:58 PM
  • Hi Mixttime,

    you can take the help of your IT department to repair the Office suite.

    if that not work then try to reinstall it may help you to solve the issue.

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, November 23, 2017 1:34 AM
    Moderator