Solved

Why doesn't zorder work in VBA?

Posted on 2004-04-07
4
975 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 50

Expert Comment

by:Ryan Chong
ID: 10774147
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
ID: 10774283
0
 

Author Comment

by:dustybryn
ID: 10774437
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
ID: 10894152
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

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…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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…
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…

777 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