Results 1 to 3 of 3

Thread: [RESOLVED] Excel Add-In: Showing UserControl, VS2012

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jan 2013
    Posts
    22

    Resolved [RESOLVED] Excel Add-In: Showing UserControl, VS2012

    So I'm working on learning VB.Net and VBA as additional languages. I must clearly be missing something simple from the MS example, because I can't seem to get my user control to pop up:

    Code:
        Private Sub ControlPannel_Click(sender As Object, e As RibbonControlEventArgs) Handles ControlPanel.Click
            Dim controlpanel1 As UserControl1
            controlpanel1 = New UserControl1
            controlpanel1.Show()
            controlpanel1 = Nothing
    
        End Sub
    UserControl1 is just the standard user control with tabs and a list box, dropped in it. It runs without an error, but nothing pops up.

    My eventual goal is to have a user control (or some other window) pop up, and allow the user to input instances from an Access Database in the active worksheet.

    Thanks

  2. #2
    PowerPoster dunfiddlin's Avatar
    Join Date
    Jun 2012
    Posts
    8,245

    Re: Excel Add-In: Showing UserControl, VS2012

    If it's a control it must be added to a form. It doesn't do 'pop-up' from .Show which is a command for forms.
    As the 6-dimensional mathematics professor said to the brain surgeon, "It ain't Rocket Science!"

    Reviews: "dunfiddlin likes his DataTables" - jmcilhinney

    Please be aware that whilst I will read private messages (one day!) I am unlikely to reply to anything that does not contain offers of cash, fame or marriage!

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Jan 2013
    Posts
    22

    Re: Excel Add-In: Showing UserControl, VS2012

    Ah of course. I knew it was something stupidly simple. Thanks.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width