what is the problem?

Public Sub Form_Load()
Public gender(0 To 99) As String, num(0 To 99) As Integer, birth(0 To 99) As Integer, sur(0 To 99) As String, seat(0 To 99) As Integer



the computer said that i cannot use "pulic" in sub or function
but i want to declare those variables so that they can be used throughtout the whole program

Comments

  • : Public Sub Form_Load()
    : Public gender(0 To 99) As String, num(0 To 99) As Integer, birth(0 To 99) As Integer, sur(0 To 99) As String, seat(0 To 99) As Integer
    :
    :
    :
    : the computer said that i cannot use "pulic" in sub or function
    : but i want to declare those variables so that they can be used throughtout the whole program
    :
    Try that
    [code]
    Public gender(0 To 99) As String, num(0 To 99) As Integer, birth(0 To 99) As Integer, sur(0 To 99) As String, seat(0 To 99) As Integer

    Public Sub Form_Load()
    End Sub
    [/code]
    In VB, you cannot declare Public variable inside of Sub or Function scope
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion