Macro code

B

Brenda

I have created a marco so that i have a button on one page and when you click
on the button it will bring up the document that i have hidden which is
correct however i want it to go away once they click on the bottom that says
close and i want it to got back to being hidden. How do i do this???
 
B

Brenda

here is the code that i used to hide the file;
Sub UnhideExpenseCorpOffice3quarter()
Sheets("ExpenseCorpOffice3quarter").Visible = True
Sheets("ExpenseCorpOffice3quarter").Select
End Sub


Now when they click on the button to take them to the file that i have
hidden i would like to have a button on that page where if they click the
close button it will go back to be hidden. My reason for doing this is
because i am creating a spreadsheet for 4 of my reps and i would like for
them to be able to hit the button and it wouldn't keep all of the files open.
I was also thinking is there a way that they can enter a code and only be
able to open up their own spreadsheet i have composed just for them and not
to be able to open up the others?
 
N

NoodNutt

Deb

On your Sheet "ExpenseCorpOffice3Quarter insert a MacroButton and assign the
following.

Assign another sheet name where you want the focus to go once the sheet has
been hidden.

Sub HideExpenseCorpOffice3quarter()
Sheets("ExpenseCorpOffice3quarter").Visible = False
Sheets("SomeOtherSheetName").Select
End Sub

HTH
Mark.
 
Top