V.B.A.02
07-20-2017, 03:10 AM
Hello, I am new, so this might have been answered earlier however I could not find it any where answer that's why posting, Help is appreciated..
I have two subs, I am using same variable names to declare a variable but in different cases (lowercase & Mixed) and what i see VBA just makes them similar. See blow:
Sub First()
Dim mystr As String
'Do Something...
End Sub
Sub Second()
Dim MyStr As String
'Do Something
End Sub
here, first 'mystr' gets changed to 'MyStr' by VBA automatically (latest variable changes all previous ones), I am asking this just out of curiosity, want to understand why is it happening, is it normal or I have something different.
Thanks.
I have two subs, I am using same variable names to declare a variable but in different cases (lowercase & Mixed) and what i see VBA just makes them similar. See blow:
Sub First()
Dim mystr As String
'Do Something...
End Sub
Sub Second()
Dim MyStr As String
'Do Something
End Sub
here, first 'mystr' gets changed to 'MyStr' by VBA automatically (latest variable changes all previous ones), I am asking this just out of curiosity, want to understand why is it happening, is it normal or I have something different.
Thanks.