Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Getting VBA program on taskbar

Posted on 2001-06-18
3
Medium Priority
?
309 Views
Last Modified: 2012-03-24
Ok...Another tough one...at least for me...

I have a program with several forms that is used to automate a word document.  I would like to have the forms show up on the windows taskbar (for a variety of reasons) while the program is running, if the form is "visable".

Now, I understand that with a single form program, if I check the block in the properties window ("showintaskbar") that the form will show...but this seems to only work with programs of only one form.

In my case, I have most of my code in a module called "subMain." I start the program with subMain and I use the following code

Sub Main()
Dim oform As Form1
Set oform = New Form1
    oform.Show vbModal
Set oform = Nothing
End Sub


And Form1 starts the show.  But even though I indicate in the properties section to "showintaskbar=true", for all of my forms, I can not get them to display.

Have tried a bit of troubleshooting...placed all my code in Form1 and launched, and managed to get Form1 to show up on the taskbar, but still none of the other, subsequent forms (not to mention errors associated with attempts to access variables.

Is there something I'm missing here to get all my forms on the taskbar.

thanks!

Philip





Philip

0
Comment
Question by:philipsimmons
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 2

Expert Comment

by:agriggs
ID: 6202553
A form that is shown modally cannot be shown in the taskbar.

0
 

Author Comment

by:philipsimmons
ID: 6203074
Drat!  Any way around this...Is it possible for some forms to be modal and other not?

thanks man
0
 
LVL 2

Accepted Solution

by:
agriggs earned 400 total points
ID: 6203241
The main problem for me when I show forms non-modally is that the Show is non-blocking, i.e.


Form1.Show vbModal

does not return until the form is through, so it's easy to keep track of the instance of form1.


Form1.Show

returns immediately as soon as the form is loaded and shown.  So the code example as you gave above wouldn't work
because you unload the form when the Show returns.

Outside of this problem, you can show all of your forms non-modally.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question