Error Visual Basic: ! Compile error. Can't find project or library

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Familie Spies

    #1

    Error Visual Basic: ! Compile error. Can't find project or library

    Hi all,

    When running a program I made in VB under Windows XP i'm getting the
    following error: ! Compile error. Can't find project or library. (see also
    http://home.kabelfoon.nl/~hspies/2.jpg )

    See the code where it stucks: http://home.kabelfoon.nl/~hspies/1.jpg

    Ubder Windows 98 this error does not occur. Who knows what I do wrong, I've
    tried a lot but the error keeps coming in Win XP. Thanks.

    John



  • Mike

    #2
    Re: Error Visual Basic: ! Compile error. Can't find project or library

    Check what "TextString " is declared as. If it is not declared - declare it
    as String.


    "Familie Spies" <hspies@caiw.nl > wrote in message
    news:411d0ace$0 $216$58c7af7e@n ews.kabelfoon.n l...[color=blue]
    > Hi all,
    >
    > When running a program I made in VB under Windows XP i'm getting the
    > following error: ! Compile error. Can't find project or library. (see also
    > http://home.kabelfoon.nl/~hspies/2.jpg )
    >
    > See the code where it stucks: http://home.kabelfoon.nl/~hspies/1.jpg
    >
    > Ubder Windows 98 this error does not occur. Who knows what I do wrong,[/color]
    I've[color=blue]
    > tried a lot but the error keeps coming in Win XP. Thanks.
    >
    > John
    >
    >
    >[/color]


    Comment

    • M. Posseth

      #3
      Re: Error Visual Basic: ! Compile error. Can't find project or library

      Well to stay social with this newsgroup i will answer in English , but in
      fact i am a Dutch programmer located in Rotterdam

      If i look at the screenshot i think that Mike is right and this error is
      triggered because you have not declared the TextString

      To avoid these errors set the folowing statement at the top of your code
      modules

      Option Explicit '(every serieus VB coder uses Option Explicit )

      if you run it now VB will tell you that the variable was not declared

      To solve your problem you should add

      Dim TextString as string


      If i may make another comment about your coding ,,, you should use a
      identifier naming convention that adds a prefix to the identifier name to
      indicate the functional type of the identifier.
      the official MS standard is using Hungarian notation

      Dim strJustanExampl e as string
      Dim blnStop as boolean
      Dim dblAbigNumber as double
      Dim objMsAcces as object
      etc etc etc

      I hope you get the point , this will help you when your programs get bigger
      ( and you might not see the declaration in scope ), and make the code much
      more readable for an external party

      For the rest it looked really nice and well documented

      Groeten

      M. Posseth [MCP]


      "Mike" <email@noserver .com> wrote in message
      news:5EeTc.3442 8$Mq1.1977454@n ews20.bellgloba l.com...[color=blue]
      > Check what "TextString " is declared as. If it is not declared - declare[/color]
      it[color=blue]
      > as String.
      >
      >
      > "Familie Spies" <hspies@caiw.nl > wrote in message
      > news:411d0ace$0 $216$58c7af7e@n ews.kabelfoon.n l...[color=green]
      > > Hi all,
      > >
      > > When running a program I made in VB under Windows XP i'm getting the
      > > following error: ! Compile error. Can't find project or library. (see[/color][/color]
      also[color=blue][color=green]
      > > http://home.kabelfoon.nl/~hspies/2.jpg )
      > >
      > > See the code where it stucks: http://home.kabelfoon.nl/~hspies/1.jpg
      > >
      > > Ubder Windows 98 this error does not occur. Who knows what I do wrong,[/color]
      > I've[color=green]
      > > tried a lot but the error keeps coming in Win XP. Thanks.
      > >
      > > John
      > >
      > >
      > >[/color]
      >
      >[/color]


      Comment

      Working...