B
Bruce
I have two different Subs which each receive three string variables.
Both subs are based off the same code.
Here's the problem: calls to the first sub work no problem, calls to
the second sub produce a ByRef type mismatch compile error on the LAST
string variable only. If I mix the order of the variables (both in
the Call and in declaration) it will still error the last variable.
e.g. (selected statements)
Public Const PublicConstant1 = "Blah Blah" as String
Dim String1, String2, String3 as String
Dim StringTemp as String
String2 = "Blah Blah"
String3 = "Blah Blah"
StringTemp = String3
Call Sub DoThis(String1, String2, String3) 'String3 will produce
compile error
Call Sub DoThis(String1, String3, String2) 'String2 will produce
compile error
Call Sub DoThis(String1, String2, StringTemp) 'Will compile fine
Call Sub DoThis(String1, String2, PublicConstant1) 'Will compile fine
Call Sub DoThis(String1, String2, "Blah Blah") 'Will compile fine
Public Sub DoThis(PassString1, PassString2, PassString3 as String)
Has anybody come across this and discovered why? (I've tried
compacting and repairing but that doesn't fix it)
Cheers,
Bruce Walker
Both subs are based off the same code.
Here's the problem: calls to the first sub work no problem, calls to
the second sub produce a ByRef type mismatch compile error on the LAST
string variable only. If I mix the order of the variables (both in
the Call and in declaration) it will still error the last variable.
e.g. (selected statements)
Public Const PublicConstant1 = "Blah Blah" as String
Dim String1, String2, String3 as String
Dim StringTemp as String
String2 = "Blah Blah"
String3 = "Blah Blah"
StringTemp = String3
Call Sub DoThis(String1, String2, String3) 'String3 will produce
compile error
Call Sub DoThis(String1, String3, String2) 'String2 will produce
compile error
Call Sub DoThis(String1, String2, StringTemp) 'Will compile fine
Call Sub DoThis(String1, String2, PublicConstant1) 'Will compile fine
Call Sub DoThis(String1, String2, "Blah Blah") 'Will compile fine
Public Sub DoThis(PassString1, PassString2, PassString3 as String)
Has anybody come across this and discovered why? (I've tried
compacting and repairing but that doesn't fix it)
Cheers,
Bruce Walker