Tenes q declarar la variable en las declarasiones generales, ej:
salu2
Código [Seleccionar]
Dim Variable As String
Private Sub Command1_Click()
Variable = "Hola"
End Sub
Private Sub Command2_Click()
Variable = "Chau"
End Sub
salu2