vba - Creating DTPicker Control dynamically -
can please guide me on how create date picker control dynamically in vba? here trying do. have macro adds textbox , combobox controls dynamically vba userform, based on whether end user visible or not. visibility(and other control properties-width,height, etc) controlled end user, updating yes/no, values against control names provided in ‘master’ sheet in excel.
this did textbox , combobox controls
`sub test() ---- code dim txttextbox msforms.textbox dim cmbcombobox msforms.combobox if 'some cell in excel ‘master’ worksheet' = "combobox" set cmbcombobox = userform.controls.add("forms.combobox.1", 'some cell in excel ‘master’ worksheet') cmbcombobox.top = 'some cell in excel ‘master’ worksheet' cmbcombobox.left = 'some cell in excel ‘master’ worksheet' cmbcombobox.width = 'some cell in excel ‘master’ worksheet' cmbcombobox.height = 'cell in excel ‘master’ worksheet' ----rest of code end sub`
my question is, how add date picker dynamically, way adding textbox , combobox. using controls.add right way it? if how can that? can me out this! hope question makes sense.
Comments
Post a Comment