If Test is a global or module-level variable whose value you set earlier, then you will need to remove the Dim Test statement.
Also, if Item is a contact item, then CompanyName is not a custom property, hence the correct syntax would be Item.CompanyName.

Signature
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx
> Hi,
>
[quoted text clipped - 6 lines]
>
> Thanks Joel
Hi Joel,
Is the company name a value?
"("CompanyName").Value"
Since you said "field" I assume your working a textbox on a form.
Try Item.UserProperties("CompanyName").Text = Test

Signature
John
johnf202 at hot mail dot com
> Hi,
>
[quoted text clipped - 6 lines]
>
> Thanks Joel