Results 1 to 3 of 3

Thread: [RESOLVED] [02/03] Type Expected

  1. #1

    Thread Starter
    PowerPoster sparrow1's Avatar
    Join Date
    May 2005
    Location
    Globetrotter
    Posts
    2,820

    Resolved [RESOLVED] [02/03] Type Expected

    Hi All,

    What do they mean with Type expected after declaration of a variable.
    Here's the declaration:

    Dim statusBar1 As Statusbar = New Statusbar

    The blue marked Statusbar gives me the error.
    How can I solved it.

    Wkr,

    sparrow1
    Wkr,
    sparrow1

    If I helped you, don't forget to Rate my post. Thank you

    I'm using Visual Studio.Net 2003 and
    2005
    How to learn VB.Net Create setup with VB 2005 Drawing for beginners VB.Net Tutorials GDI+ Tutorials
    Video's for beginners

  2. #2
    Hyperactive Member josep's Avatar
    Join Date
    Sep 2006
    Location
    Barcelona
    Posts
    409

    Re: [02/03] Type Expected

    Try that if you are not in a form code
    VB Code:
    1. Dim statusBar1 As System.Windows.Forms.Statusbar = New System.Windows.Forms.Statusbar
    Useful links:DB connection strings ADO.NET VB.NET Tutorials

    • Don't forget to close the thread if solved
    • If this post helps you rate it

  3. #3

    Thread Starter
    PowerPoster sparrow1's Avatar
    Join Date
    May 2005
    Location
    Globetrotter
    Posts
    2,820

    Re: [02/03] Type Expected

    Quote Originally Posted by josep
    Try that if you are not in a form code
    VB Code:
    1. Dim statusBar1 As System.Windows.Forms.Statusbar = New System.Windows.Forms.Statusbar
    Hi,

    That does it.

    Thanks,

    sparrow1
    Wkr,
    sparrow1

    If I helped you, don't forget to Rate my post. Thank you

    I'm using Visual Studio.Net 2003 and
    2005
    How to learn VB.Net Create setup with VB 2005 Drawing for beginners VB.Net Tutorials GDI+ Tutorials
    Video's for beginners

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width