Solved

label control not appearing

Posted on 1999-01-03
4
147 Views
Last Modified: 2010-05-18
I have a label control on a form with a grid1 control. when someone requests data to fill the grid control I set the label.visible=true, because it says "Please wait" but it dosn't work. The label control is initially set to false then when a person clicks on fillgrid the first command is to make it visible, but it stays invisible. If I F8 and step thru the program, when that command is reached it works perfectly, I have tried placing the label in different places on the form, but to no avail. I also have a check to inform the user that no data is available and if that event is triggered then before the msgbox pops up the label will become visible. This has me stumped, there is no reason why it shouldn't work. I have used this in other programs and it has worked fine the only difference is the grid control.
I am using VB4-16bit.
Any thoughts?
0
Comment
Question by:dtucker
[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
4 Comments
 
LVL 3

Expert Comment

by:a111a111a111
ID: 1453671
one thought without looking at your code:

place exit sub just after you call the lable to be visible.

like this:

lable1.visible = true
exit sub


now you should see the lable visible and continue from there.

you can also email me your code or post it here.

shayplace@hotmail.com
0
 
LVL 2

Expert Comment

by:trillo
ID: 1453672
You're probably executing a lot of code (or time consuming code), and you don't give a chance to the label to paint itself... try something like:

label1.Visible = True
label1.Refresh
. next code statements...

Trillo
0
 

Expert Comment

by:Ajoy
ID: 1453673
dtucker,
as far as my exp with grid, it should cause u no problems.
try what Mr.shayplace has  written and if that works then check ur code for filling the grid.
regards,
ajoy
0
 
LVL 1

Accepted Solution

by:
jeffcameron earned 30 total points
ID: 1453674
use the doevents command, it will allow windows to repaint.

label1.Visible = True
doevents

0

Featured Post

Enroll in July's Course of the Month

July's Course of the Month is now available! Enroll to learn HTML5 and prepare for certification. It's free for Premium Members, Team Accounts, and Qualified Experts.

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…
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.
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…
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
Course of the Month6 days, 9 hours left to enroll

634 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