Solved

Why doesn't zorder work in VBA?

Posted on 2004-04-07
4
961 Views
Last Modified: 2012-08-13
Hi,
    I am trying to write a small vba app in Outlook. I want to use an MSH Flexgrid control and a standard combo box. Weird thing is that when i try to draw the combo box onto my form it always disappears behind the MSH  Flexgrid and I need it to appear on top? I've tried bringing the combo forwards/ sending the flexgrid backwards and also setting the zorder of both controls at run-time but still no luck. Am I missing something obvious? Any help is most welcome.

Cheers,
           Dust.
0
Comment
Question by:dustybryn
4 Comments
 
LVL 49

Expert Comment

by:Ryan Chong
Comment Utility
Maybe can try draw a PictureBox Control, and then put your combo box inside the PictureBox ? Just guess it will works..
0
 
LVL 9

Accepted Solution

by:
p_sie earned 150 total points
Comment Utility
0
 

Author Comment

by:dustybryn
Comment Utility
Basically what p_sie has said is that it can't be done which although it doesn't help me it has saved me from spending hours chasing red herrings. The conclusion I draw from it is that VBA is a bit naff I'll probably write my app in VB instead.
0
 

Expert Comment

by:GTejeda
Comment Utility
I know this is a little late, but I just read this and had the same problem.
I fixed it by adding a frame to the form, then adding the combo into the
frame and then displaying the frame. For reasons I do not understand
the frame will show up in front of the grid, not behind.
If the frame is set to have no border and to be the same size as the combo,
you won't see it. Positioning of course then is done by moving the frame,
the combo will always have top=0 left=0.
Hope someone else will find this useful.
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
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 process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

743 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

15 Experts available now in Live!

Get 1:1 Help Now