473,834 Members | 2,298 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How do I set label caption and make it visible runtime?

I have a label on a worksheet. When I press a button on the same worksheet, the program should set the new label caption and do some other calculations. The problem is, that new label caption is visible after the program finishes. I have put application.scr eenupdating= false after setting new label caption, so this is not the problem. Can anyone please help me.
Nov 14 '10 #1
1 2116
Guido Geurs
767 Recognized Expert Contributor
This is how I change the Command caption in a loop (each time the index is changed).

Expand|Select|Wrap|Line Numbers
  1.    For ARRDATAidx = 1 To UBound(ARRDATA)
  2. ...
  3. ...
  4.    Sheets("DATA").Com_Search.Caption = "Line: " & ARRDATAidx & " from " & UBound(ARRDATA) & " lines checked."
  5. DoEvents
  6.    Next
"DoEvents" let the sheet the time to update the layout.
Nov 15 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

by: Pavan Arise | last post by:
Hi all.. This may seem simple..but I am stuck here! I have a frame in which I have a label. I was trying to change the caption of that label via code (I mean at runtime & not design time). But there is always an error saying "Compile error: Method or data member not found" I have no idea how to solve thsi problem. I have created my label on the frame itself. I tried to do it witha text box instead of a label...but in vain...the same error...
by: Stone | last post by:
HI I am new to this forum. The problem I am facing is that when I do the coding for the label. The caption option doesnot appear in the drop down menu when I write the label name (e.g : lbldisplay.) .and if I type caption by myself it gives the error 'Caption' is not a member of 'System.window.forms.label'. I am using Express edition 2005 of VB.
by: Ryan | last post by:
I've got a little bit of code that runs when you enter data in a datasheet view (which is a subform of the form you are in) if rst!DateReceived >= 30 Then Forms!DisposalRecords.Label90.Caption = (Date - rst!DateReceived) & " Days" however, when that runs to update the caption, it says that it cannot find form DisposalRecords
by: dgardner | last post by:
This one has me stumped and I hope someone can help. I have a form with a button on it. When I click the button, I want a label named lblWait to be visible. (When the form opens, the label is not visible.) I have this line of code: Me.lblWait.Visible = True Then there is a line that defines strSQL. This takes a minute or so.
by: webbi | last post by:
I have a text box called txtAttirubte1 and an update button in FormA. I want to update the label caption for all label name Attribute1_Lable in FormB and FormC with the WORD I type in the FormA text box, txtAttribute1. I have the following codes for the ON CLICK event of Update button on FormA. Private Sub cmdUpdate_Click() DoCmd.OpenForm "frm_FormB" !!.Caption = Me!.Value DoCmd.Close acForm, frm_FormB, acSavePrompt ...
by: zion | last post by:
Hello, How can I change label caption on page load ? Thanks
by: Annie Bender | last post by:
Hi guys, brand new here as you can see. Brand new to VB too, although pretty good at HTML, asp, VBScript, Java script. This will seem simple to you guys, but I am stuck here! The intended application is the simple user box displayed in an Excel workbook, shown in the thumbnail below. It's all static content, nothing interactive, and I've got it put together except for one thing: I want the main text in the box to contain a volatile value,...
by: Annie Bender | last post by:
Wow, I finally got through my first VB "tutorial" project and everything works nice, except one userform label caption will only display as long as the Excel column it draws data from is set wide enough to show the data on the spreadsheet too. But that data is not supposed to be visible to spreadsheet users, as it involves intermediate calculations only. I don't see anything special about either that particular data (it's numeric) or about the...
by: jonkillua | last post by:
hi guys, i'm creating a program that instead of using the print method to display the odd/even numbers, i want to display the result in label.caption. Im crazy about it, please help me. Private Sub cmdEven_Click() Dim x As Integer Dim intReturn As Integer If txtNum = "" Then intReturn = MsgBox("enter a number!", vbExclamation + vbOKOnly) End If
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.