Adding Mutiple Lines of Textboxes / Combo Boxes

jcornish

New Member
Joined
Jul 21, 2014
Messages
11
Hi All,

I am currently putting together a stop-gap time booking tool. I am using a userform for this.

Users will be able to add new lines, consisting of time entries for each day, against booking codes.

The number of lines needs to be dynamic. The user presses a command button to add a new row.

I have my original row, and can add a second row. However, I have "hard coded" the second row, e.g. for Monday hours entry the textbox is called monHours2.

I don't want to limit the user on the number of rows so I need something like monHours(i).

Here's what I have working so far with the hard coding:

Code:
Set bfMonHours2 = Controls.Add("Forms.textbox.1", bfMonHours2)

    With bfMonHours2
        .Top = 174 + 15 * i
        .Left = 156
        .Width = 42
    End With

Any and all help appreciated!
 
Last edited:

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.

Forum statistics

Threads
1,223,243
Messages
6,170,964
Members
452,371
Latest member
Frana

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top