I'm trying to create a function where I can set values in a Userform. How can I give the name of the Userform as a parameter? E.g. I'd like to set current date in TextBox1 in UserForm1. It would be something like Userforms("UserForm1").TextBoxes("TextBox1").Value=Date? Normally I do this just by using command UserForm1.TextBox1.Value=Date but if I want to create a generic function (like Function SetFrmValue(FrmName, ObjName, ObjValue)), this is not working.