Solved

flag viewer in vb6 not vb.net

Posted on 2006-07-21
4
646 Views
Last Modified: 2013-12-25
I programming a flag viewer with a chk box. I'm not using vb.net but vb6.
So I don't have a .checked option.
How can I program a chk box so the caption appears and diappears. when chked or unchked.
This is what I have so far:
Private Sub chkProgramer_Click()
    'Displays programmers name.

     lblName.Caption = "David Malone"
   
    End Sub
The name appears when chk box is unchked only.
But the name stays no matter how mant times I chk or unchk the box.
0
Comment
Question by:dmalonel
[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 5

Accepted Solution

by:
Davidshc76 earned 125 total points
ID: 17158790
Private Sub chkProgramer_Click()
    If chkProgramer.Value = 0 Then 'uncheck chk box
       lblName.Caption = "David Malone"
    ElseIf chkProgramer.Value = 1 Then 'check chk box
       lblName.Caption = ""
    End If
End Sub
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
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…

728 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