Hi,
I create a form through VBA, using the code I shown below.. How can I set macros which I had created earlier into the events properties of the textboxes and commmand button too?
Thanks..
Set ctlText = CreateControl(frm.Name, acTextBox, , "", "", _
intDataX, intDataY)
Set ctlLabel = CreateControl(frm.Name, acLabel, , ctlText.Name, _
"BookTitle", intLabelX, intLabelY)
Set ctlText = CreateControl(frm.Name, acTextBox, , "", "RetailPrice",intDataX, intDataY + 500)
Set ctlLabel = CreateControl(frm.Name, acLabel, , ctlText.Name, _
"Retail Price", intLabelX, intLabelY + 500)
Set ctlButton = CreateControl(frm.Name, acCommandButton, , "", "", intLabelX, intLabelY + 1000)
I create a form through VBA, using the code I shown below.. How can I set macros which I had created earlier into the events properties of the textboxes and commmand button too?
Thanks..
Set ctlText = CreateControl(frm.Name, acTextBox, , "", "", _
intDataX, intDataY)
Set ctlLabel = CreateControl(frm.Name, acLabel, , ctlText.Name, _
"BookTitle", intLabelX, intLabelY)
Set ctlText = CreateControl(frm.Name, acTextBox, , "", "RetailPrice",intDataX, intDataY + 500)
Set ctlLabel = CreateControl(frm.Name, acLabel, , ctlText.Name, _
"Retail Price", intLabelX, intLabelY + 500)
Set ctlButton = CreateControl(frm.Name, acCommandButton, , "", "", intLabelX, intLabelY + 1000)