Wrox Programmer Forums
|
Beginning VB 6 For coders who are new to Visual Basic, working in VB version 6 (not .NET).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 1st, 2006, 02:29 AM
Registered User
 
Join Date: Jul 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to rbalagr Send a message via Yahoo to rbalagr
Default I am deucedly stuck here

I am new to VB, and iam trying with a program that displays the time difference between start time button click and end time button clik,
everything seems to be proper but when i run this programme iam getting this error at StartTime button click
---------------------------
Compile error:

Method or data member not found
---------------------------

and it indicates the following line
lblStart.Caption = Format(StartTime, "hh:mm:ss")

the code is
Sub cmdStart_Click()
    StartTime = Now
    lblStart.Caption = Format(StartTime, "hh:mm:ss") <-- getting
    lblEnd.Caption= "" struck here
    lblElapsed.Caption = ""
End Sub

the solution might be very simple but iam madly stuck here
Plz help me!


&nbsp;- bala
 
Old July 1st, 2006, 01:36 PM
Friend of Wrox
 
Join Date: May 2006
Posts: 643
Thanks: 0
Thanked 0 Times in 0 Posts
Default

My guess is that you are using a textbox rather than a Label control for your label. The label control has a property of Caption you use to display the text you want to display, where the textbox has a property named Text.

The error you are getting is an error that will occur when the compiler cannot find the Method or Property (also known as a data member) that you are trying to use.

Since a label control DOES have a Caption property, there is a good chance that you are mistakenly using the wrong control.

That is where I suggest you look first.

Woody Z http://www.learntoprogramnow.com
 
Old July 6th, 2006, 07:19 AM
Registered User
 
Join Date: Jul 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to rbalagr Send a message via Yahoo to rbalagr
Default

Thx for the reply, its my bad man! actually i am using Six labels in my application, i was doing copy paste of Labels. i deleted all and i added one by one. i worked well. Thanks

&nbsp;- bala





Similar Threads
Thread Thread Starter Forum Replies Last Post
Stuck on the first chapter flashster BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 4 September 1st, 2006 03:40 AM
Help - I'm Completely Stuck [email protected] ASP.NET 1.x and 2.0 Application Design 1 May 16th, 2006 10:12 AM
Help!! I am completely stuck... andrewba Classic ASP Components 5 May 12th, 2005 04:50 AM
stuck on a field reindeerw Access 0 August 3rd, 2004 10:41 AM
I'm stuck! budman Classic ASP Databases 2 November 3rd, 2003 12:52 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.