There are no global variables in VB so you need to use static variables.
Code:
Function updateSales(ByVal thisSale As Decimal) As Decimal
Static totalSales As Decimal = 0
totalSales += thisSale
Return totalSales
End Function
' more code...
updateSales.totalSales = 2
Part of this code in on MSDN. I just added the end to show you how to use it after the procedure has terminated.