Bookshelf Home | Contents | Index | PDF |
Siebel VB Language Reference > Methods Reference for Siebel VB > Variable Manipulation Methods > Declare Global Variable StatementThe Declare Global Variable statement declares a global variable. It does not return a value. You must declare a global variable in every module from which Siebel VB must access that variable. You declare a global variable in the general declarations section of the module. FormatGlobal variableName [As type] [,variableName [As type]] ... The following table describes the arguments that you can use with this method. UsageIf you do not include the As clause, then you can add a type character as a suffix to the variableName argument. You can simultaneously use the two different type specification methods in a single Global statement, but you cannot use these methods simultaneously on the same variable. Regardless of how you declare a global variable, you can choose to include or not include the type character when you reference the variable from another section of code. Siebel VB does not consider the type suffix as part of the variable name. Formats That You Can Use to Specify the Type of a Global VariableVisual Basic is a strongly typed language. You must assign a data type to a variable or Siebel VB assigns a type of variant. Table 24 describes the data types you can use to specify the type of a global variable. Declaring a global variable is the same as declaring a variable, except where noted in the Format column in Table 24. The Reference column includes a link to the description for declaring a variable. ExampleThe following example includes two subroutines that share the total and acctno variables, and the grecord record: (general)(declarations) Global acctno as Integer Sub CreateFile Sub Button_Click Related TopicsCreate Function Method |
Siebel VB Language Reference | Copyright © 2015, Oracle and/or its affiliates. All rights reserved. Legal Notices. | |