定义一个全局变量codedim code as string按拨号按钮时将输入框内容保存在code中private sub command1_click()code=text1.textend sub按重拨键时将code的内容恢复到输入框private sub command2_click()text1.text=codeend sub