error can't find project or library

C

cedtech23

I have some vba Excel code that works when it is run on a windows 2000
OS PC But when I run the same code on an Windows XP OS PC I
get
Compile error can't find project or library

both PC have Office 2003 (Excel) installed

Debug brings me to



Code:
--------------------

Private Sub UserForm_Initialize()
txtCurrentDate.Value = Format(Now(), "mm/dd/yyyy")
End Sub

--------------------

If I get rid of the Format function it solves the error




Code:
--------------------

Private Sub cmdEmail_Click()
If Trim(Me.txtEmployeeName) = "" Then
Me.txtEmployeeName.SetFocus
MsgBox "Employee Name is a Required Field", vbOKOnly, "Required Field"
Exit Sub
Else
Worksheets("LeaveRequested").[C5] = txtEmployeeName.Text
End If

--------------------


If I get rid of the Trim function it solves the error



How can I resolve this issue so that my VBA code works on both Windows
2000 and XP OS???
 
M

MattShoreson

Tools>refernces

it should have a checkbox and prefixing it should say 'MISSING'
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top