I'm getting errors like the one below throughout my code when it's run on just a couple of computers but no problem when on others with the same Excel versions.
In the problem computer this has a "Compile Error: Can't find project or library".
If I add
this then works but turns up another error (undeclared variable)
until it gets to a function and then the function turns up the same compile error - highlights LEFT, but not in yellow... just as selected with the Function highlighted yellow.
section where LEFT is selected on error
Has anyone any clue what could possibly cause such a thing?
I have tried an old version of the workbook... and some of the code that hasn't changed and the variable wasn't declared but it works fine there just not in the new workbook although it's no different.
Code:
Sub PrivateMsg()
If Range("Message") <> "" Then
Msg = MsgBox(Range("Message"), vbInformation, "Message")
Else
End If
End Sub
In the problem computer this has a "Compile Error: Can't find project or library".
If I add
Code:
dim Msg as integer
until it gets to a function and then the function turns up the same compile error - highlights LEFT, but not in yellow... just as selected with the Function highlighted yellow.
section where LEFT is selected on error
Code:
Do While True
If Len(Code) = 0 Then c = "": Exit Do
c = Left(Code, 1)
Code = Right(Code, Len(Code) - 1)
Select Case c
Case " "
Case "A" To "Z", "a" To "z"
ThisPartner = ThisPartner & c
Case Else
Exit Do
End Select
Loop
Has anyone any clue what could possibly cause such a thing?
I have tried an old version of the workbook... and some of the code that hasn't changed and the variable wasn't declared but it works fine there just not in the new workbook although it's no different.