Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default How to create textbox's at a userform Initialize

I have a VBA program that has several forms. On one form are three
multiselect listboxes. I have a button that will allow the user to review
the data they selected and also see a final price. Seeing that I don't know
how many textboxes I will need I would like to create a text box in the
intialize procedure of the review form.

Any ideas on how I can accomplish this?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 269
Default How to create textbox's at a userform Initialize

Create the form with all of the textboxes and captions you may need.

You can then use this for the form (the code goes behind the form in VBA).

Set whatever conditions you need and show and hide boxes and captions as
needed

Private Sub UserForm_Initialize()

if (Condition to display) then
Userform.Label1.Caption = "Whatever message you need"
TextBox1.Enabled = True
TextBox1.Visible = True
else
Userform.Label1.Caption = ""
TextBox1.Enabled = False
TextBox1.Visible = False
end if
End sub

--
If this helps, please remember to click yes.


"Dwaine Horton" wrote:

I have a VBA program that has several forms. On one form are three
multiselect listboxes. I have a button that will allow the user to review
the data they selected and also see a final price. Seeing that I don't know
how many textboxes I will need I would like to create a text box in the
intialize procedure of the review form.

Any ideas on how I can accomplish this?

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
Userform Initialize [email protected] Excel Programming 4 August 7th 07 06:01 AM
UserForm initialize event run when UserForm is shown [email protected] Excel Programming 2 June 13th 07 02:49 AM
Formating textbox's on a userform Oggy Excel Programming 2 January 23rd 07 09:01 PM
UserForm initialize Arne Hegefors Excel Programming 8 September 8th 06 01:48 PM
initialize userform, using a sub natanz[_2_] Excel Programming 11 November 22nd 05 05:30 AM


All times are GMT +1. The time now is 09:45 AM.

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"