Solved

Getting VBA program on taskbar

Posted on 2001-06-18
3
281 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
  • 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 100 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

910 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

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now