D
Dave Unger
Hello,
When I compile the following code, I get a "Byref argument type mismatch", which is exactly what I'd expect to get.
Sub test1()
Dim l As Long
l = 3
test2 l
End Sub
Sub test2(s As String)
'do someting
End Sub
So my question is, why don't I get a compile error on this bit of code? I thought my Excel had become corrupted, but I tried it on other machines, same results - no compile error.
Sub test1()
Dim r As Range
Set r = Range("a1")
test2 r
End Sub
Sub test2(w As Worksheet)
'do someting
End Sub
Thank you,
Regards
DaveU
When I compile the following code, I get a "Byref argument type mismatch", which is exactly what I'd expect to get.
Sub test1()
Dim l As Long
l = 3
test2 l
End Sub
Sub test2(s As String)
'do someting
End Sub
So my question is, why don't I get a compile error on this bit of code? I thought my Excel had become corrupted, but I tried it on other machines, same results - no compile error.
Sub test1()
Dim r As Range
Set r = Range("a1")
test2 r
End Sub
Sub test2(w As Worksheet)
'do someting
End Sub
Thank you,
Regards
DaveU