Hello all,
I am using below code to add textbox in Page 3 of my userform based on input in textbox( in Page 2.
I wanted to have a button in the text box ( like in refedit) and found the solution of it through the blog of Jon Peltier
where Same can be done by using TextBox.DropButtonStyle & TextBox.ShowDropButtonWhen. But the problem is the same need to be put in user form initialize event, which in my case is not possible as I am inserting textbox in Page 3 after initialising the event. I tried putting it along with ctlTXT at the time of defining properties but its not coming through
Any solution is highly appreciable.
I am using below code to add textbox in Page 3 of my userform based on input in textbox( in Page 2.
Code:
Me.MultiPage1.Value = MultiPage1.Value + 1
Dim cSpnEvnt As cControlEvent
Dim ctlSB As Control
Dim ctlTXT As Control
Dim lngCounter As Long
For lngCounter = 1 To Me.TB_no_of_TB
On Error GoTo 0
Set ctlTXT = Me.Frame1.Controls.Add("Forms.Textbox.1", "Text" & lngCounter)
ctlTXT.Name = "Text" & lngCounter
ctlTXT.Left = 6
ctlTXT.Height = 25.5: ctlTXT.Width = 150
ctlTXT.Top = (lngCounter - 1) * 30 + 30
Next lngCounter
Me.Frame1.ScrollHeight = (lngCounter - 1) * 30 + 30
ctlTXT.DropButtonStyle = frmDropButtonStyleplain
ctlTXT.ShowDropButtonWhen = frmShowDropButtonwhenAlways
I wanted to have a button in the text box ( like in refedit) and found the solution of it through the blog of Jon Peltier
HTML:
http://peltiertech.com/refedit-control-alternative/
Any solution is highly appreciable.
Last edited: