jlachapelle7
New Member
- Joined
- Mar 16, 2012
- Messages
- 3
Hi everyone and thank you for taking the time to help the needy one......, I'm new to vb but I'm learning quick as I have been task to do a template for my cie. Here is my task. My sheet is as follow:
a ............b ................c
1 ----header line ( wont move)------
2.............................data1
3........button down....data1
4........empty line...............
5........empty line...............
6........button up........data2
7........button down....data2
8........empty line...............
9........empty line...............
10.......button up........data3
11.... ..button down....data3
12.......empty line...............
13.......empty line...............
etc.....
I can record a macro that move block data 2 to position of block data 1, eg: line 5 and 6 in place of 1 and 2. I select c2;c3, copy to empty line c4:c5. than I cut c6:c7 and paste it to c1;c2. Finally I cut c4:c5 back to c6:c7.
Ity work great, but I want to copy those button for hundreds of data block, but the macro always call the same range of cells, so it's a lot of macro to record. I wish I can copy those button and assign a macro that will select the range of cells of datafrom the origin cell of the button and move them accordinly. Colomn 1 and 2 won't move as well as as row1. Rows 2 don't have a move up button becasuse it's first line.
All my macros so far are in form.
a ............b ................c
1 ----header line ( wont move)------
2.............................data1
3........button down....data1
4........empty line...............
5........empty line...............
6........button up........data2
7........button down....data2
8........empty line...............
9........empty line...............
10.......button up........data3
11.... ..button down....data3
12.......empty line...............
13.......empty line...............
etc.....
I can record a macro that move block data 2 to position of block data 1, eg: line 5 and 6 in place of 1 and 2. I select c2;c3, copy to empty line c4:c5. than I cut c6:c7 and paste it to c1;c2. Finally I cut c4:c5 back to c6:c7.
Ity work great, but I want to copy those button for hundreds of data block, but the macro always call the same range of cells, so it's a lot of macro to record. I wish I can copy those button and assign a macro that will select the range of cells of datafrom the origin cell of the button and move them accordinly. Colomn 1 and 2 won't move as well as as row1. Rows 2 don't have a move up button becasuse it's first line.
All my macros so far are in form.