Hi everyone,
I'm trying to add an amount to a cell using a function procedure called from a Sub procedure. I know you could do this with just a Sub directly, but I want to learn how to do it via calling a Function from a Sub.
So I have these 2 procedures (1 Sub & 1 Function):
Function Addtothatcell(cell)
Addtothatcell = cell + 1
End Function
Sub CallThatStuff()
Addtothatcell (e3)
End Sub
As you can see, I'm trying to use the Sub to "call" the Function. And what it ultimately needs to do is add 1 to whatever is in cell E3. When I run the "Sub CallThatStuff", it's not giving me an error, but it's also not adding the 1 to the cell. Does anyone know what is wrong?
thanks,
I'm trying to add an amount to a cell using a function procedure called from a Sub procedure. I know you could do this with just a Sub directly, but I want to learn how to do it via calling a Function from a Sub.
So I have these 2 procedures (1 Sub & 1 Function):
Function Addtothatcell(cell)
Addtothatcell = cell + 1
End Function
Sub CallThatStuff()
Addtothatcell (e3)
End Sub
As you can see, I'm trying to use the Sub to "call" the Function. And what it ultimately needs to do is add 1 to whatever is in cell E3. When I run the "Sub CallThatStuff", it's not giving me an error, but it's also not adding the 1 to the cell. Does anyone know what is wrong?
thanks,