Results 1 to 2 of 2

Thread: expression is not a method

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2005
    Posts
    305

    expression is not a method

    hi guys, im migrating from vb6 to vb.net and have only very basic knowledge of .net. now i upgraded one of my projects, in which i had function cleartexts() which would clear all the text boxes of the forms. now to upgrade it to .net i converted it to sub (as it didnt return anything), so it looked like,
    Code:
    public sub cleartexts()
    for i = 1 to 24
    text(i).text=""
    next
    end sub
    but .net 2005 gives the error, "expression is not a method", how do i call it then?? or what modifications do i need to make?
    thanks.....

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: expression is not a method

    Your VB6 app apparently uses a control array and they are not supported in VB.NET. You will have to create your own array of TextBoxes in code and/or restructure your code. If you want to read about VB6 control arrays and VB.NET then just search the web because there's a ton of literature dedicated to the topic. Guess what - there's even a link at the top of this page in the VB Wire News section.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

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