Hi all,
So far I love tweaking it all and taking my first steps in Excell. I've been looking around, but I can't seem to find a simple solution.
What I would like to do now is to pass variables from one sub to another (all in the same module). The idea is simple. I have a sub, where I call 2 other subs. In the second, I have a simple string I want work with, in the third sub there is a calculation I need. Here's a short example of what I try to do in code (with presumable a lot of mistakes).:
So far I love tweaking it all and taking my first steps in Excell. I've been looking around, but I can't seem to find a simple solution.
What I would like to do now is to pass variables from one sub to another (all in the same module). The idea is simple. I have a sub, where I call 2 other subs. In the second, I have a simple string I want work with, in the third sub there is a calculation I need. Here's a short example of what I try to do in code (with presumable a lot of mistakes).:
Code:
Sub hallo()
k As Integer
k = 7
Call Message
Call calculations
MsgBox text & " - " & calc
End Sub
Sub calculations(k As Integer)
calc = k * 5
End Sub
Sub Message()
text As String
text = "It worked!"
End Sub