L
leonidas
Hi,
I have a worksheet (sheet1) with four commandbuttons on row1 and I have
added a new worksheet (sheet2). When I unprotect sheet1, activate the
button "Design Mode" on the "Control Toolbox" toolbar, copy row1 and
paste it as row1 on sheet2, the commandbuttons are also copied.
When I record this with the macro recorder (see code below) and play
the macro afterwards it copies row1 but the commandbuttons are NOT
copied.
What do I need to change to also copy these commandbuttons? Thanks in
advance!
Code:
--------------------
Sheets("Sheet1").Select
Sheets.Add
Sheets("Sheet1").Select
ActiveSheet.Unprotect
Rows("1:1").Select
Selection.Copy
Sheets("Sheet2").Select
Rows("1:1").Select
ActiveSheet.Paste
I have a worksheet (sheet1) with four commandbuttons on row1 and I have
added a new worksheet (sheet2). When I unprotect sheet1, activate the
button "Design Mode" on the "Control Toolbox" toolbar, copy row1 and
paste it as row1 on sheet2, the commandbuttons are also copied.
When I record this with the macro recorder (see code below) and play
the macro afterwards it copies row1 but the commandbuttons are NOT
copied.
What do I need to change to also copy these commandbuttons? Thanks in
advance!
Code:
--------------------
Sheets("Sheet1").Select
Sheets.Add
Sheets("Sheet1").Select
ActiveSheet.Unprotect
Rows("1:1").Select
Selection.Copy
Sheets("Sheet2").Select
Rows("1:1").Select
ActiveSheet.Paste