Solved

Getting VBA program on taskbar

Posted on 2001-06-18
3
278 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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

757 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

22 Experts available now in Live!

Get 1:1 Help Now