Today, I was trying to download an excel file I build onto a friend's cpu who has office 2007. As we were navigating through the userform, all of a sudden an error popped up.

The error said something along the lines of object library not found, I don't recall the exact message,

but it highlighted the Format word in the below code.



Private Sub txtHomePhone_Exit(ByVal Cancel As MSForms.ReturnBoolean)
    
    
    
    On Error GoTo error_handler
    
    
    
    txtHomePhone = Format(txtHomePhone, "[<=9999999](###) ###-####")
    
    Exit Sub
    
    
error_handler:
    
    
    MsgBox "Must enter phone number as 555-555-5555"
    
    
    
End Sub

I would appreciate any response or help in getting this resolved or how to avoid this.


thanks

josh