VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   3195
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   ScaleHeight     =   3195
   ScaleWidth      =   4680
   StartUpPosition =   3  '窗口缺省
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Click()
  Dim A As String, B As String
  Cls                           '清除窗体文字
  A = "ABCDE"
  B = "12345"
  Print "主过程在调用子过程之前的原变量数据："; "A1="; A; "   "; "B1="; B
  Print "_____________________________________________________________"
  Sub1 A, B
  Print "主过程调用传值子过程之后的变量数据："; "A1="; A; "   "; "B1="; B
End Sub
Rem 传值子过程SJH1
Public Sub Sub1(ByVal X As String, ByVal Y As String)
    Dim T As String
    T = X
    X = Y
    Y = T
    Print "传值子过程中互换变量值后的变量数据："; "X1="; X; "   "; "Y1="; Y
End Sub

