R
Roxy
I am using MS 2003 and these are password protected sheets. I have a macro
that when a user clicks this particular button it creates 4 extra duplicates
(Extra Earned Income Methd 1) of the same spread sheet and inserts the grand
total from the extra worksheet on to a master grand total worksheet (family
totals) at the end of the workbook.
What I want is that when the user clicks the command button that just one
extra duplicate is created, and the button could be clicked up to four times.
That way if they are not going to use all of them there are not so many open
tabs. Any ideas?? Below is my macro.
Thank you in advance for any help.
~Roxy
Private Sub CommandButton1_Click()
Worksheets("Extra Earned Income Methd 1").Visible = True
Sheets("Extra Earned Income Methd 1").Select
Worksheets("Extra Earned Income Methd 1").Visible = True
Worksheets("family totals").Range("A5").EntireRow.Hidden = False
Worksheets("Extra Earned Income Methd 1 (2)").Visible = True
Sheets("Extra Earned Income Methd 1 (2)").Select
Worksheets("Extra Earned Income Methd 1 (2)").Visible = True
Worksheets("family totals").Range("A6").EntireRow.Hidden = False
Worksheets("Extra Earned Income Methd 1 (3)").Visible = True
Sheets("Extra Earned Income Methd 1 (3)").Select
Worksheets("Extra Earned Income Methd 1 (3)").Visible = True
Worksheets("family totals").Range("A7").EntireRow.Hidden = False
Worksheets("Extra Earned Income Methd 1 (4)").Visible = True
Sheets("Extra Earned Income Methd 1 (4)").Select
Worksheets("Extra Earned Income Methd 1 (4)").Visible = True
Worksheets("family totals").Range("A8").EntireRow.Hidden = False
Sheets("Extra Earned Income Methd 1").Select
End Sub
that when a user clicks this particular button it creates 4 extra duplicates
(Extra Earned Income Methd 1) of the same spread sheet and inserts the grand
total from the extra worksheet on to a master grand total worksheet (family
totals) at the end of the workbook.
What I want is that when the user clicks the command button that just one
extra duplicate is created, and the button could be clicked up to four times.
That way if they are not going to use all of them there are not so many open
tabs. Any ideas?? Below is my macro.
Thank you in advance for any help.
~Roxy
Private Sub CommandButton1_Click()
Worksheets("Extra Earned Income Methd 1").Visible = True
Sheets("Extra Earned Income Methd 1").Select
Worksheets("Extra Earned Income Methd 1").Visible = True
Worksheets("family totals").Range("A5").EntireRow.Hidden = False
Worksheets("Extra Earned Income Methd 1 (2)").Visible = True
Sheets("Extra Earned Income Methd 1 (2)").Select
Worksheets("Extra Earned Income Methd 1 (2)").Visible = True
Worksheets("family totals").Range("A6").EntireRow.Hidden = False
Worksheets("Extra Earned Income Methd 1 (3)").Visible = True
Sheets("Extra Earned Income Methd 1 (3)").Select
Worksheets("Extra Earned Income Methd 1 (3)").Visible = True
Worksheets("family totals").Range("A7").EntireRow.Hidden = False
Worksheets("Extra Earned Income Methd 1 (4)").Visible = True
Sheets("Extra Earned Income Methd 1 (4)").Select
Worksheets("Extra Earned Income Methd 1 (4)").Visible = True
Worksheets("family totals").Range("A8").EntireRow.Hidden = False
Sheets("Extra Earned Income Methd 1").Select
End Sub