Variablen Modulübergreifend
Hallo zusammen,
Modul 1:
Public Sub aufruf()
Static namen(5) As String
namen(0)="TEST"
End Sub
Modul 2:
Public Sub ausgabe
MsgBox(namen(0))
End Sub
Und auf dem Tabellenblatt1 ist ein CommandButton mit folgendem Code hinterlegt.
Private Sub CommandButton20_Click()
Call Modul2.ausgabe
End Sub
Dass natürlich in Modul2 die Variable namen nicht bekannt ist, weiß ich. Wie kann ich diese übergeben?
Gruß
Modul 1:
Public Sub aufruf()
Static namen(5) As String
namen(0)="TEST"
End Sub
Modul 2:
Public Sub ausgabe
MsgBox(namen(0))
End Sub
Und auf dem Tabellenblatt1 ist ein CommandButton mit folgendem Code hinterlegt.
Private Sub CommandButton20_Click()
Call Modul2.ausgabe
End Sub
Dass natürlich in Modul2 die Variable namen nicht bekannt ist, weiß ich. Wie kann ich diese übergeben?
Gruß
Please also mark the comments that contributed to the solution of the article
Content-Key: 91162
Url: https://administrator.de/contentid/91162
Printed on: April 24, 2024 at 20:04 o'clock