ChristianC
Nieuwe gebruiker
- Lid geworden
- 7 feb 2013
- Berichten
- 4
Hoi,
Het uitwisselen van gevevens tussen 2 modules lukt niet
als van module 2 een functie in module 1 is dan werkt het wel?
In de controle staat " kan de module niet compileren"
Kan iemand me helpen,want ik zie de oplossing niet.
module1
Public Sub test1()
Dim x As Integer
Dim y As Integer
Dim k As Integer
Dim u As Variant
x = 10
y = 20
k = module2.test2(x, y, u)
Debug.Print u
End Sub
module2
Sub test2(Optional ByRef x As Integer, Optional ByRef y As Integer, Optional ByRef u As Variant)
u = x & y + 10
End Sub
Het uitwisselen van gevevens tussen 2 modules lukt niet
als van module 2 een functie in module 1 is dan werkt het wel?
In de controle staat " kan de module niet compileren"
Kan iemand me helpen,want ik zie de oplossing niet.

module1
Public Sub test1()
Dim x As Integer
Dim y As Integer
Dim k As Integer
Dim u As Variant
x = 10
y = 20
k = module2.test2(x, y, u)
Debug.Print u
End Sub
module2
Sub test2(Optional ByRef x As Integer, Optional ByRef y As Integer, Optional ByRef u As Variant)
u = x & y + 10
End Sub