472,973 Members | 2,413 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,973 software developers and data experts.

Visual Studio 2005 - (VB) Public definitions in module

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
Aug 4 '06 #1
2 1174

"Henry Jones" <he********@yada.comwrote in message
news:%2****************@TK2MSFTNGP06.phx.gbl...
>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
Where, exactly, did you place the declarations, in relation to the form
where you try to reference the object variables?
If your public strings are declared in a separate class, you'll need an
instance of that class to be available to the form code.
Aug 5 '06 #2

"Henry Jones" <he********@yada.comwrote in message
news:%2****************@TK2MSFTNGP06.phx.gbl...
>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
Upon re-reading your post (yes, my face is red), I see you defined the
variables in a VB module, not a class. So disregard my previous.
I have attempted to recreate your problem without success here, in VS 2005.
I declared:

Public s As String in a VB Module, then assigned the address of a string
literal to it, using the Text property of a TextBox. I then was able to
display the string in a label.
All code in a form Button1_Click event procedure.
Aug 5 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: DL | last post by:
Hi, I'm lost right now... I used 'Visual Studio 2005 Beta Home' to make a small application. But since the computer i want to use it on has .Net 2003 installed I get a version error. This...
4
by: Charts | last post by:
6/23/05 ..NET Development\Framework\dotnet.framework.aspnet Visual Studio 2005 Beta 2 project cannot work in IIS virtual directory I used Visual Studio 2005 Beta 2 to build a simple new...
3
by: Shapper | last post by:
Hello, I am starting 2 new projects to deliver in January 2006. I want to create them in Asp.Net 2.0 using Visual Studio 2005. All my clients web sites are Visual Studio 2003 projects in...
6
by: Tom McL. | last post by:
I'm trying to move a program that was designed using Visual Studio 2003 and (Visual Basic) into Visual Studio 2005. When it runs I get the following warning in the Error List Window and I'm not...
8
by: William LaMartin | last post by:
I just received my Visual Studio upgrade to 2005 and tried to create a new web site via File | New Web Site with location http. Unfortunately I received the following error: "Visual Web...
3
by: Crazy Cat | last post by:
Hi, I'm developing an application that is basically a VB.NET front end to a SQL Server Express 2005 database -- right now I'm using VB.NET 2005 Express until my MSDN subscription gets delivered...
7
by: Nathan Sokalski | last post by:
I am an ASP.NET developer, and Visual Studio 2005 seems to have stopped declaring the controls that I add in the *.designer.vb files, therefore forcing me to manually add them before I can use them...
0
by: fischermx | last post by:
Environment: Microsoft Visual Studio 2005 Version 8.0.50727.762 (SP.050727-7600) Microsoft .NET Framework Version 2.0.50727 Microsoft Visual Studio 2005 Professional Edition - ENU Service Pack...
11
by: =?Utf-8?B?UGV0ZXI=?= | last post by:
I have seen the terms Visual Basic 2005 and VB.NET. It seems that sometimes they seem to be referring to the same thing but sometimes they are not. I also run into terms like VB9 and VB10.
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.