Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


"lblTime is not declared"

Posted on 2017-04-16
Medium Priority
Last Modified: 2017-04-16
Im making a library system and im having trouble with displaying the timer for the borrowed book, heres the code..

Public Class Form1

    Private Sub TableBindingNavigatorSaveItem_Click(sender As Object, e As EventArgs) Handles TableBindingNavigatorSaveItem.Click

    End Sub

    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        'TODO: This line of code loads data into the 'LibrarySystemBelleBelleDatabaseDataSet1.Table' table. You can move, or remove it, as needed.

    End Sub

    Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
        lblTime.Text = TimeString
    End Sub
End Class
Question by:Maribel Silvestre
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
LVL 53

Assisted Solution

by:Ryan Chong
Ryan Chong earned 400 total points
ID: 42094812
"lblTime is not declared"
make sure you got a control named as lblTime in your form: Form1?

Accepted Solution

Olatunde Francis Oyeyemi earned 1600 total points
ID: 42094819
From here
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
        lblTime.Text = TimeString
    End Sub

If am correct lblTime is a label right? Make sure is (lblTime) there on the form, then try this Now.ToString("hh:mm:ss tt") you can use any format you want, if its date and time use Now.ToString("yyyy/MM/dd hh:mm:ss")
Also make sure you enable your Timer.

if error still persist, use this to test
msgbox(Now.ToString("hh:mm:ss")) in place of lblTime.Text = TimeString

Author Closing Comment

by:Maribel Silvestre
ID: 42094893
Thank you for helping!
The timer is already working thank you! :D

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In this post we will learn different types of Android Layout and some basics of an Android App.
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Starting up a Project
Suggested Courses

609 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