Required VBA Code

charnaliaamit

New Member
Joined
Jun 15, 2012
Messages
6
Hi

I request you to please provide me a code that provide the following solution as per the below query

I am using Excel 2007, I want the code for the following sheet profile

In my work sheet their is 20 Tabs and i have to work on all this simutaneously,

In my worksheet i Insert Hyperlink on each Tab except Ist 1st Tab back to index, when i click on this hyperlink i will back to Ist Tab,
First tab i insert a hyperlink for all the other tab.

Now i want all nineteen tab become automatically hide

and when i click on hyperlink on the Ist Tab for 3rd tab, 3rd tab become visible
and when i click on hyperlink Back to index on 3rd tab, i will come on the ist tab and 3rd tab beome hide

similarly when i click on hyperlink on the Ist Tab for 15th tab, 15th tab become visible
and when i click on hyperlink Back to index on 15th tab, i will come on the ist tab and 15th tab beome hide

I need this is happened in all the 19 tab

Thanks in advance
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
The simple way is to add a few buttons rather tahn hyperlink.

So on each tab apart from tab on add a button and attach this code:

Code:
Sub Tab1()
ActiveSheet.Visible = False
Sheets("Tab1").Select
End Sub

This will hide the tab you are in and take you back to tab one.

On the main sheet create a button for each tab and attach the code:

Code:
Sub Tab5()
Sheets("Tab5").Visible = True
Sheets("Tab5").Select
End Sub

There will need to be a code for each tab and you will have to change the tab names.

You can avoid having to create 19 codes by getting a userform to pop up where it will display a list of the tabs and the user selects the tab they want. This will save you having a lot of buttons.
 
Upvote 0
1. Using shapes just draw a square.

2. Add the text you want so you know what the button is for.

3. Right click on the shape and select assign macro.

4. Select the macro you wish to assign.

That's it when you next left click the button it will run the macro.
 
Upvote 0

Forum statistics

Threads
1,214,924
Messages
6,122,293
Members
449,077
Latest member
Rkmenon

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top