473,765 Members | 1,940 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 2112
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

3
11448
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...
2
3756
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.
4
5044
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
5
11268
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.
2
14908
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 ...
1
2825
by: zion | last post by:
Hello, How can I change label caption on page load ? Thanks
2
3914
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,...
4
5098
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...
1
7659
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
0
9393
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10153
Oralloy
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...
0
10007
jinu1996
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...
1
9946
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,...
0
9832
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8830
agi2029
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...
1
3921
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3530
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2800
bsmnconsultancy
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.