try
myname = format(myname, vbPropercase)

pete