emaduddeen
Programmer
Hi Everyone,
I have a scoping question.
I have 2 forms and on the main form there are several variables like this:
I also have several procedures like this as well:
In the other form I tried to issue a call like this:
How do I make these global so they can be seen by my other form?
Thanks.
Truly,
Emad
I have a scoping question.
I have 2 forms and on the main form there are several variables like this:
Code:
Public Class frmMainForm
Dim strSourceMSDataFolder As String = "c:\data\ms data"
Dim strSourceDBADataFolder As String = "C:\Data\DBA"
Dim strDestinationDrive As String = Nothing
Dim strDestinationFolder As String = _
strDestinationDrive & "Data_" & Format(Now, "MM_dd_yyyy")
I also have several procedures like this as well:
Code:
Public Sub FindThumbDrive()
' Find the highest drive letter of a thumb drive inserted into the computer.
'---------------------------------------------------------------------------
For Each objDrive As DriveInfo In DriveInfo.GetDrives
If objDrive.DriveType = DriveType.Removable Then
strDestinationDrive = objDrive.Name
End If
Next
If strDestinationDrive = Nothing Then
MessageBox.Show("I can't do anything else now because there is no " & _
"thumb drive found on your computer." & _
vbCrLf & vbCrLf & _
"Please insert one and try again.", "Important", _
MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
End If
End Sub
In the other form I tried to issue a call like this:
Code:
FindThumbDrive()
How do I make these global so they can be seen by my other form?
Thanks.
Truly,
Emad