LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default Command Button Click Help

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

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Command Button Click bmolintas Excel Discussion (Misc queries) 4 November 8th 07 10:37 PM
vba to click a command button [email protected] Excel Programming 5 October 24th 06 04:59 PM
VBA Click Command Button Benz Excel Programming 5 August 4th 06 09:30 PM
why do i have to click my 2nd command button twice rjudge Excel Programming 9 April 5th 06 04:16 PM
How to add a command button and on-click within vba Papa Jonah Excel Programming 9 December 2nd 04 12:10 AM


All times are GMT +1. The time now is 06:13 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"