Click here to Skip to main content
15,891,607 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Edit A Subcontrol within a control Pin
Dave Kreskowiak4-Sep-07 11:48
mveDave Kreskowiak4-Sep-07 11:48 
GeneralRe: Edit A Subcontrol within a control Pin
Polymorpher4-Sep-07 12:01
Polymorpher4-Sep-07 12:01 
GeneralRe: Edit A Subcontrol within a control Pin
Dave Kreskowiak4-Sep-07 15:38
mveDave Kreskowiak4-Sep-07 15:38 
QuestionPanel VScrollBar to also control's Datagrid's VScrollBar! Pin
jensenx4-Sep-07 7:22
jensenx4-Sep-07 7:22 
AnswerRe: Panel VScrollBar to also control's Datagrid's VScrollBar! Pin
Dave Kreskowiak5-Sep-07 6:10
mveDave Kreskowiak5-Sep-07 6:10 
GeneralRe: Panel VScrollBar to also control's Datagrid's VScrollBar! Pin
jensenx5-Sep-07 8:02
jensenx5-Sep-07 8:02 
GeneralRe: Panel VScrollBar to also control's Datagrid's VScrollBar! Pin
jensenx8-Sep-07 7:10
jensenx8-Sep-07 7:10 
QuestionGlobal variables Pin
A.D.Scott4-Sep-07 4:36
A.D.Scott4-Sep-07 4:36 
I am just starting out with VB 2005 express, and I'm having trouble defining global variables.
I want to use (read and write) the same variables in many different class subroutines, so I want to declare them as global variables.
To do this I created a module called modMain, and defined the variables in the declarations section of the module using script such as

Public strPartNumber As String
Public Const c_ItemNumber As Integer = 1
Public strPartArray (300,5) As String

When I run the code, the program stops at the line within a class subroutine, in which I am trying to change the value of a variable with the command:

strPartNumber = "QQQQ"

The error returned is 'TypeInitializationException was unhandled'

I'd be grateful if anybody could tell me what I'm doing wrong.
Thanks
Andy Scott



Andy Scott

AnswerRe: Global variables Pin
Christian Graus4-Sep-07 4:47
protectorChristian Graus4-Sep-07 4:47 
GeneralRe: Global variables Pin
A.D.Scott4-Sep-07 4:53
A.D.Scott4-Sep-07 4:53 
GeneralRe: Global variables Pin
Christian Graus4-Sep-07 5:17
protectorChristian Graus4-Sep-07 5:17 
GeneralRe: Global variables Pin
Dave Kreskowiak4-Sep-07 5:23
mveDave Kreskowiak4-Sep-07 5:23 
GeneralRe: Global variables Pin
Christian Graus4-Sep-07 6:13
protectorChristian Graus4-Sep-07 6:13 
AnswerRe: Global variables Pin
Dave Kreskowiak4-Sep-07 4:56
mveDave Kreskowiak4-Sep-07 4:56 
GeneralRe: Global variables Pin
Pascal Ganaye4-Sep-07 5:55
Pascal Ganaye4-Sep-07 5:55 
GeneralRe: Global variables Pin
Dave Kreskowiak4-Sep-07 6:08
mveDave Kreskowiak4-Sep-07 6:08 
GeneralRe: Global variables Pin
Polymorpher4-Sep-07 9:14
Polymorpher4-Sep-07 9:14 
GeneralRe: Global variables Pin
Dave Kreskowiak4-Sep-07 11:47
mveDave Kreskowiak4-Sep-07 11:47 
GeneralRe: Global variables Pin
Polymorpher4-Sep-07 11:52
Polymorpher4-Sep-07 11:52 
GeneralRe: Global variables Pin
Dave Kreskowiak4-Sep-07 15:41
mveDave Kreskowiak4-Sep-07 15:41 
GeneralRe: Global variables Pin
Polymorpher4-Sep-07 20:50
Polymorpher4-Sep-07 20:50 
QuestionHow to tests whether the current user is a member of the Administrator's group ? Pin
Ky Nam4-Sep-07 4:08
Ky Nam4-Sep-07 4:08 
AnswerRe: How to tests whether the current user is a member of the Administrator's group ? Pin
Dave Kreskowiak4-Sep-07 4:46
mveDave Kreskowiak4-Sep-07 4:46 
GeneralRe: How to tests whether the current user is a member of the Administrator's group ? Pin
Ky Nam4-Sep-07 4:56
Ky Nam4-Sep-07 4:56 
QuestionHow can change color on selected row listview Pin
papoluca4-Sep-07 3:51
papoluca4-Sep-07 3:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.