adiing textbox..at runtime
hi there
i want to add the textboxes on my form at runtime equal to the number ..say two as per the input is it possible? -- hemu |
adiing textbox..at runtime
Private Sub UserForm_Initialize()
Dim newCtrl As Control, num As Integer num = 2 For i = 1 To num Set newCtrl = _ Me.Controls.Add("Forms.TextBox.1", _ "txtBox" & i, True) newCtrl.Top = 30 * i Next i End Sub Hemant_india wrote: hi there i want to add the textboxes on my form at runtime equal to the number ..say two as per the input is it possible? -- hemu |
adiing textbox..at runtime
million thanks JW
-- hemu "JW" wrote: Private Sub UserForm_Initialize() Dim newCtrl As Control, num As Integer num = 2 For i = 1 To num Set newCtrl = _ Me.Controls.Add("Forms.TextBox.1", _ "txtBox" & i, True) newCtrl.Top = 30 * i Next i End Sub Hemant_india wrote: hi there i want to add the textboxes on my form at runtime equal to the number ..say two as per the input is it possible? -- hemu |
All times are GMT +1. The time now is 08:08 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com