Copying rows and objects

Zahhhaaaa

Board Regular
Joined
Jun 29, 2011
Messages
62
Hello again, I'm a rookie programming excel so I need some help to get start.

I gotta question;

In worksheet, i have four columns, A6, B6, C6, D6

A6 contains ComboBox4, named Groups
B6 contains ComboBox3, Work
C6 contains ComboBox7, Area
D6 contains two textboxes 7 and 8. named Working time

What I need to, is to add a commandbutton to copy this row, range A6:D6 and place it in range A7:D7.

I know that I can do this by recording, but when I do this, it records macro normally but ignores comboboxes etc. What I got is an empty row.

And also, I need to have many many rows. So is it possible to have Commandbutton "New row", and everytime I click this, it gives me a new row WITH combobox3 4 and 7, and textboxes7 and 8, over and over again, under previous row
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
They are ActiveX-objects, they're able to be copied when design mode is selected, but when I unselect it, objects CAN be copied. But for now, I haven't find a code to copy range A6:D6 and insert it below, as many times as I want it to appear.

It goes like this, I do my things on row a6:d6, then I press "new row", it gives me a new row on a7:d7, i do my things, then press "new row" again, it gives me a row in a8:d8, etc etc etc, as many times as I want
 
Upvote 0
You want to generate hundreds of ActiveX buttons? What for?
Instead of ActiveX controls, you better use Forms button. It can be created on the fly (for instance, by double-clicking a cell) and there's no need to write procedures after creating it - procedure can be created beforehand.
See example.
 
Upvote 0
Yeah, 'cuz these objects are drop down menus, and i need to copy them. I can use forms too, but then, what is the code to copy them and insert them below the copied row?

And there's not gonna be hundreds of comboboxes, maybe ten, twenty.. just said
 
Upvote 0
You did say "many many" rows...

Can you not use Data Validation dropdowns instead?
 
Upvote 0
well, maybe I can use that.. It just would've been much better looking worksheet with activex objects or forms
 
Upvote 0
That's a matter of opinion. ;)
 
Upvote 0
Nah, it doesn't even look that bad =) But now, can you help me with the code how to copy that row, and insert it below? Many many times =)
 
Upvote 0
Code:
Range("A6:D6").Copy Destination:=Range("A7")
 
Upvote 0

Forum statistics

Threads
1,224,603
Messages
6,179,855
Members
452,948
Latest member
UsmanAli786

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