Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Can this be done, and how...?

Posted on 1998-06-10
3
Medium Priority
?
169 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 2

Accepted Solution

by:
marti earned 840 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
Suggested Courses

688 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