Hi,
I am not familiar with VBA and I probaly make a nice salad ...
However, I am trying to connect a timer to a customised function that reverse a string (as an example for timing a function or a macro).
My original function that works is:
Function reverse(str)
reverse = StrReverse(str)
End Function
The timer code I found is:
Sub TimeTest()
Dim t As Single
t = Time()
'your code here
Debug.Print Second(Time() - t)
End Sub
How do I put the timer code with in the function? It did not work for me.
Thanks,
Tamir
I am not familiar with VBA and I probaly make a nice salad ...
However, I am trying to connect a timer to a customised function that reverse a string (as an example for timing a function or a macro).
My original function that works is:
Function reverse(str)
reverse = StrReverse(str)
End Function
The timer code I found is:
Sub TimeTest()
Dim t As Single
t = Time()
'your code here
Debug.Print Second(Time() - t)
End Sub
How do I put the timer code with in the function? It did not work for me.
Thanks,
Tamir