Dear jny, Thanks for your reply. I tried but the code will set it to Checked status. May I know what true means in this statement? Thanks. dlg.SetAttributeValueByID 50, var, true