Print Page | Close Window

Method or data member not found

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Suite Pro
Forum Description: Topics Related to Codejock Suite Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=2711
Printed Date: 17 November 2024 at 3:22pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Method or data member not found
Posted By: Tiny
Subject: Method or data member not found
Date Posted: 11 August 2005 at 1:37pm

Hi all,

I have just started Vb 6. I'm using the the microsoft Vb 6 professional step by step guide book and I am tackling the first problem, creating a program called Lucky 7.

After entering the program code (3 Times!) and running it, I keep getting a compiler error: Method or data member not found. this highlights the word .Caption = beside Label1

As I'm only a beginner I haven't a clue whats wrong!

Below is the code I entered

Private Sub Command1_Click()
    Image1.Visible = False         & nbsp;   ' hide coins
    Label1.Caption = Int(Rnd * 10) ' pick numbers
    Label2.Caption = Int(Rnd * 10)
    Label3.Caption = Int(Rnd * 10)
    'if any caption is 7 display coin stack and beep
    If (Label1.Caption = 7) Or (Label2.Caption = 7) _
      Or (Label3.Caption = 7) Then
      Image1.Visable = True
      Beep
    End If
End Sub

I would be grateful of any suggestions

Tiny




Replies:
Posted By: SuperMario
Date Posted: 11 August 2005 at 2:00pm
You spelled "Visible" wrong

....
     Or (Label3.Caption = 7) Then
      Image1.Visable = True
      Beep
    End If



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net