Kerry H
04-20-2019, 10:15 PM
Hi,
A couple of questions which relate to coding efficiency and best practices:
1. I have seen a couple of comments from apparently knowledgeable people suggesting that an integer is best DIMed as long.
Yet most example code I see, DIMs integers as Integer.
Your thoughts?
2. Looping with If . . . Then:
If one has just 2 or 3 statements dependent on an IF condition, is it better to code as
If [conditionA] Then
statement 1
statement 2
End If
OR
If [conditionA] Then statement 1
If [conditionA] Then statement 2
I have many of this type of If . . . Then in a sub. Perhaps the small difference in coding adds up?
Thank for your thoughts.
A couple of questions which relate to coding efficiency and best practices:
1. I have seen a couple of comments from apparently knowledgeable people suggesting that an integer is best DIMed as long.
Yet most example code I see, DIMs integers as Integer.
Your thoughts?
2. Looping with If . . . Then:
If one has just 2 or 3 statements dependent on an IF condition, is it better to code as
If [conditionA] Then
statement 1
statement 2
End If
OR
If [conditionA] Then statement 1
If [conditionA] Then statement 2
I have many of this type of If . . . Then in a sub. Perhaps the small difference in coding adds up?
Thank for your thoughts.