hellfire45
Active Member
- Joined
- Jun 7, 2014
- Messages
- 464
So I have been writing vba for a few years now but something I often see that I never do is declaring variables inside the sub line.
For example:
Why do people do it like this? I would normally do it like.
Are these effectively the same thing? If not, what is the difference?
For example:
Code:
sub my_routine (strSearch As String, variable2 as long, variable3 as integer)
Why do people do it like this? I would normally do it like.
Code:
sub my_routine()
dim strsearch as string
dim variable2 as long
dim variable3 as integer
Are these effectively the same thing? If not, what is the difference?