N
newbie
First of all i want to thank people who come here and help others.
I have posted a few questions and have many nice people help me.
Now for my question: I am confused. I just started a few days ago
learning to do some VBA. I noticed that when i create a macro in VBA i
see VBA makes the following code entries in the code window:
sub name1()
end sub
The name1 is the macro name that i assign when invoking the create
macro button in the macro dialog box. But when i change the code to,
Function name() the macro name that i created disappears? Now i want a
return value to go into a cell for use later on so i feel i need a
function and not a subroutine. The only other way might be to use a
subroutine but write a value back to a cell of my choosing, any
thoughts on this as far as best practice for my situation? You can
tell i am really new at this, sorry for any dumb questions.
Andrew
I have posted a few questions and have many nice people help me.
Now for my question: I am confused. I just started a few days ago
learning to do some VBA. I noticed that when i create a macro in VBA i
see VBA makes the following code entries in the code window:
sub name1()
end sub
The name1 is the macro name that i assign when invoking the create
macro button in the macro dialog box. But when i change the code to,
Function name() the macro name that i created disappears? Now i want a
return value to go into a cell for use later on so i feel i need a
function and not a subroutine. The only other way might be to use a
subroutine but write a value back to a cell of my choosing, any
thoughts on this as far as best practice for my situation? You can
tell i am really new at this, sorry for any dumb questions.
Andrew