Solved

Can this be done, and how...?

Posted on 1998-06-10
3
148 Views
Last Modified: 2010-05-03
I am using VB 5 Pro, and want to know if and how I can do the following...it seems like I can, but I just cannot string the command/logic together to get it working properly.

Picture a button on a form.  When you click on the button, you get a text box appearing on the screen.  Click again and another appears, and so on and so on.  I want to 'dynamically create text boxes'....can it (or something very similar, maybe RichText) be done?  And if so, could you please give me a run down of the major commands involved (set command?  dim x as textbox?).

Thanks for you time
oreg
0
Comment
Question by:oreg
  • 2
3 Comments
 
LVL 2

Accepted Solution

by:
marti earned 210 total points
ID: 1463048
This could be done with LOAD command.
0
 
LVL 2

Expert Comment

by:marti
ID: 1463049
Put a RichTextBox1 on a form. Set its index to 0. And this is the code needed:

Private Sub Command1_Click()
    Static ind As Integer
   
    ind = ind + 1
    Load RichTextBox1(ind)
    RichTextBox1(ind).Visible = True
    RichTextBox1(ind).Top = RichTextBox1(ind - 1).Top + RichTextBox1(ind - 1).Height + 100
   
End Sub

You may put some Err handling as well.
0
 

Author Comment

by:oreg
ID: 1463050
Thank you for the quick reply.  This worked great,
enjoy the points!

(ps: for anyone else reading this who does not know, unload RichTextBox1([number]) will get rid of the box)

oreg
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Put text in a picture ASP.NET C# 2 56
Microsoft Access combo box help 2 44
How to measure sizes and angles in scanned images ? 3 63
Set email body to html using vbscript 6 41
Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question