|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Public definitions in module - VS 2005I posted in dotnet.general but I think this is a better place to post a VB
question. I created a module in VS 2005 - Visual Basic Windows Project. I declared two strings public Public strConn as string Public strSQL as string When I tried to use these variables in my form, they haven't been defined. What is the difference between VS 2005 and VS 2003? I did the same thing is VS 2003 and everything worked. Thanks
Show quote
Hide quote
On Fri, 4 Aug 2006 14:45:55 -0700, "Henry Jones" <henryjo***@yada.com> wrote: The statements as posted are apparently OK otherwise you would get the error, "strConn Not>I posted in dotnet.general but I think this is a better place to post a VB >question. > > > >I created a module in VS 2005 - Visual Basic Windows Project. > >I declared two strings public > >Public strConn as string >Public strSQL as string > > >When I tried to use these variables in my form, they haven't been defined. >What is the difference between VS 2005 and VS 2003? I did the same thing is >VS 2003 and everything worked. > >Thanks > > Declared". By "Not Defined", I'm guessing that you have not initialized values for the variables. Gene I goofed in what I stated. When I tried to use the variables in my form, I
received an error message saying that the variables were not declared. Show quoteHide quote "gene kelley" <o***@by.me> wrote in message news:l6j7d29ds2scd5r8qvdij7310jgmnhs37u@4ax.com... > On Fri, 4 Aug 2006 14:45:55 -0700, "Henry Jones" <henryjo***@yada.com> > wrote: > >>I posted in dotnet.general but I think this is a better place to post a VB >>question. >> >> >> >>I created a module in VS 2005 - Visual Basic Windows Project. >> >>I declared two strings public >> >>Public strConn as string >>Public strSQL as string >> >> >>When I tried to use these variables in my form, they haven't been defined. >>What is the difference between VS 2005 and VS 2003? I did the same thing >>is >>VS 2003 and everything worked. >> >>Thanks >> >> > > The statements as posted are apparently OK otherwise you would get the > error, "strConn Not > Declared". > > By "Not Defined", I'm guessing that you have not initialized values for > the variables. > > Gene On Fri, 4 Aug 2006 15:53:54 -0700, "Henry Jones" <henryjo***@yada.com> wrote: If you added a Module to you app, added the variables and it looks like:>I goofed in what I stated. When I tried to use the variables in my form, I >received an error message saying that the variables were not declared. > > Module Module1 Public strConn As String Public strSQL As String End Module There is no reason that I can think of that "not declared' would show other than typo's. Gene Hello gene,
It could be possible that the module is in a different namespace than the code which is trying to use it. If this is so, add the proper Imports. -Boo Show quoteHide quote > On Fri, 4 Aug 2006 15:53:54 -0700, "Henry Jones" <henryjo***@yada.com> > wrote: > >> I goofed in what I stated. When I tried to use the variables in my >> form, I received an error message saying that the variables were not >> declared. >> > If you added a Module to you app, added the variables and it looks > like: > > Module Module1 > > Public strConn As String > Public strSQL As String > End Module > > There is no reason that I can think of that "not declared' would show > other than typo's. > > Gene > > It could be possible that the module is in a different namespace than the i would like to add to this , that you can test this easily as a module > code which is trying to use it. > If this is so, add the proper Imports. > > -Boo behaves as a class with all members declared as shared see if you can see the members with the modulename like this modulename.strConn regards Michel Posseth Show quoteHide quote "GhostInAK" <ghosti***@gmail.com> schreef in bericht news:c71747b42b2ca8c88636a81a94e8@news.microsoft.com... > Hello gene, > > It could be possible that the module is in a different namespace than the > code which is trying to use it. > If this is so, add the proper Imports. > > -Boo > >> On Fri, 4 Aug 2006 15:53:54 -0700, "Henry Jones" <henryjo***@yada.com> >> wrote: >> >>> I goofed in what I stated. When I tried to use the variables in my >>> form, I received an error message saying that the variables were not >>> declared. >>> >> If you added a Module to you app, added the variables and it looks >> like: >> >> Module Module1 >> >> Public strConn As String >> Public strSQL As String >> End Module >> >> There is no reason that I can think of that "not declared' would show >> other than typo's. >> >> Gene >> > >
Create DLL in Visual Studio 2005 accessible by Excel 2002
UDP Sending an array possible? closing all applicatios vs processes Advice on timer project UpdateDB from DataSet convert Excel to dataset using excel before windows shutdown GridView convert Excel to dataset how to appened data into a arraylist? |
|||||||||||||||||||||||