I need to keep memorized a progressive number in a function.
I have a file with some invoices to be repeated in a new sheet, the invoices have a progressive number. This number is relevant to avoid double registration in the new sheet. How can I keep this number in a function and start from it for updating.
At the moment I am using a cell in a worksheet (but I 'd like to use a function)
protocol_number = activecell.value (I get the prot nr in a sub)
if Range("a1000") = activecell.value then
Msgbox "the protocol number has been registered yet"
Thanks for helping me