I have a single Module with 4 Subroutines. 2 of the Subs share a single variable.
I am not sure why the variable is losing the value.

Here is a example code:

Public LastRow as Long (This is at the top of my module)

Public Sub CreateLiab()
Lastrow = 0
some code
Lastrow = lastrow+1
more code
CreateFile (Here I am calling a second sub that will share the variable
End sub

Public Sub CreateFile()
Myvalue = LastRow (The Value of LastRow comes across as zero?
code
End sub.

I was under the impression if the scope is public, I should be able to use the value of the variable Lastrow from the Sub CreateLiab() in my Sub CreateFile().


Any assistance will be appreciated.

Thanks