Custom Dialog Help

I created Dialog1 in my current project. I cannot figure out how to get it to come up when my "New" button is clicked. The various ways I have tried all fail. Thanks for the help.


Answer this question

Custom Dialog Help

  • Fred Robinson

    Then you haven't created a class called Dialog1 at all, or it exists in a different namespace to the code that is trying to call it.



  • Geoff Dupuis

    *grin* NO need to apologise. Glad we got it sorted.



  • R Raghu

    Double click on the new button in the designer to create a click event. Inside put

    Dim dlg as Dialog1 = new Dialog1()

    dlg.ShowDialog()

    That will work. Now, go and buy a book to help you get over the initial learning curve that includes these sort of questions. We will be happy to help you either way, but you really need some sort of reference to accelerate your early steps, or it will take you ages to get past them.



  • VBAddict

    I have done that before but I get the error "Type 'Dialog1' is not defined."

  • Jebat

    Oh yeah you were right. My mistake. Will not happen again. Sorry.

  • Custom Dialog Help