Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 107
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 638
Default 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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 107
Default 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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Textbox added to Form at runtime too small, can't control size andchange event won't trigger RCGUA Excel Worksheet Functions 0 December 10th 08 07:48 PM
How to create new textboxes during runtime?When user clicks on a button textbox shouls appear. divya Excel Programming 2 November 24th 06 12:15 AM
Runtime error textbox problem - help required N E Body Excel Programming 3 October 19th 04 10:27 PM
Deleting a textbox control at runtime Grant Williams Excel Programming 3 June 14th 04 08:33 AM


All times are GMT +1. The time now is 12:19 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"