excel - Make Label Visible if TextBox has a value -
i trying make label visible if textbox has value. far have not working?
private sub label1_change() if mailchannel.value <> "" me.label1.caption = true else me.label1.caption = false end if end sub
your current code won't triggered now, because linked form's label. should link textbox change event. can realized follows (assuming textbox name txtmailchannel):
private sub txtmailchannel_change() if txtmailchannel.value <> "" lblmailchannel.visible = true else lblmailchannel.visible = false end if end sub p.s. try introduce order code, concerns naming convention of variables. please check-out following link references: https://github.com/spences10/vba-coding-standards.
Comments
Post a Comment