Show inactive userform

  • Hi you all,


    I'm in need of some assistance for the following problem.
    For a workbook in which I have to perform a lot of the same actions, I've created an userform with buttons which link to macro's to perform these actions for me.
    Annoying is the fact that the userform stays active. How can I deactivate a userform, but stil keep it visible on my screen?


    Thanx in advance.


    Kind regards,
    Sandieslover

  • Re: Show inactive userform


    Hi RoyUK,
    thanx for your time and reaction!
    Unfortunatly does ShowModal not do the job for me. :(
    ShowModal controls if you have to close the userform or not, before continuing in the worksheet but the userform stays active. If I want to continue working in the sheet via the keyboard, I have to activate the sheet first by clicking the sheet with the mouse pointer first. I want the userform to be on top, but not active.
    Hopefully did I explain myself a bit better and can you help me out.


    kind regards,
    Sandielover

  • Re: Show inactive userform


    As Andy has pointed out,a commandbar would be better...BUT if you must use a userform then you need to run something like this every time you initiate a command from the UF


    Code
    Private Sub BackToSheet()
        AppActivate ("Microsoft Excel")
    End Sub
  • Re: Show inactive userform


    Hi guys,


    thanx for your advise!
    If only it where a few buttons it would be better to put the buttons in a toolbar, but as I have several groups of buttons I have made a userform with a Tab for each occasion. Thats the first reason.
    Second... for now toolbars could be the solution, but as I progress in my experience with VBA (witthe help of reading this forum), the manner to do this the way I do now, could be handy in other circumstances.


    So, I appreciate your help very much and hopefully I can return the favour in the future.


    Kind regards,
    Sandieslover

  • Re: Show inactive userform


    Quote from Andy Pope

    Maybe using menus on the toolbar would allow you to maintain the grouping of your buttons.


    Hi Andy,


    this is where my inexperience kicks in... :stare:
    Could you give me a small example of what you mean?
    I'm always eager to learn.


    Kind regards,
    Sandieslover

  • Re: Show inactive userform


    Try this example. Paste code into a standard module and run CreateToolbar.

  • Re: Show inactive userform [Solved]


    Hi Andy,
    your example works like charm. :thanx: Very much!


    Hi Roy,
    Thanx for your time and answere.
    Andy's example does the trick. For now at least.
    I will save this post for the future and I take a look at John Walkenbach's site.


    Thanx very much,
    and kind regards,
    Sandieslover

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!