Question: what is the difference between function and procedure in vba?
Answer: Visual Basic statements are grouped in a block enclosed by Sub , Function and matching End statements. The difference between the two is that functions return values, procedures do not. A procedure and function is a piece of code in a larger program.