Hi everybody,

a long time I'm fed up with writing:

Code:
intThisIncreasingVariable = intThisIncreasingVariable + 1
And so I decided to write the same Sub known from Turbo Pascal: "Inc"

The hole stuff should look like this. I think you then will know what I mean:

Code:
Private Sub Form_load()
  Dim TestVar as integer
  TestVar = 1
  inc(TestVar)
  MsgBox "Should be 2 but is only: " & TextVar
End Sub

Public Sub inc(ByRef x, Optional step = 1)
  x = x + step
End Sub
But in Basic it seems to be impossible to write back to the Variable in the calling statement. Is this right?

Regards,
Frank