VBA code searching for hidden worksheet which linked with picture

hasankabir375

New Member
Joined
Jul 24, 2020
Messages
6
Office Version
  1. 2013
Platform
  1. Windows
Hi could anyone share me the code for below condition?
1-I have created many wordbook and I want to index those in one page.
N.B: My point is I want to hide all the sheets, the sheets will linked with setting picture to main page. By clicking the picture linked sheet will be shown and when I come back to the main sheet the unhidden sheet will be hidden again.

Can anybod help me?
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
welcome to MrExcel

This is a simple method and only requires 2 macros

1 Name main sheet "Main" (or amend the macro!)
2 Amend the name of every picture - make each name EXACTLY the SAME as the name of the sheet for that picture
(so if sheet name is Sheet 29, the picture is also given name Sheet 29)
3 Place code GoToSheet in a module (like Module1)
4 Assign that macro to EVERY picture
5 Place code Workbook_SheetDeactivate in ThisWorkbook code window (IT WILL NOT WORK anywhere else!)
6 Test by clicking on a picture

Place in a MODULE (like Module1)
VBA Code:
Sub GoToSheet()
    Dim nm As String
    On Error Resume Next
    With Sheets(Application.Caller)
        .Visible = xlSheetVisible
        .Activate
    End With
End Sub

Place in ThisWorkbook code window
Rich (BB code):
Private Sub Workbook_SheetDeactivate(ByVal Sh As Object)
    If Sh.Name <> "Main" Then Sh.Visible = xlSheetHidden
End Sub
 
Upvote 0
Hi Sir
How are you?
I want your kind help again if you could.
I need some condition to solve through Excel e.g
1-I need to open two common sheet and hide other sheets
2-From common 2 sheet there has some red color cell which will be linked to hidden sheet. Not only the sheet even the cell which I want to go. So the the condition is clicking the linked cell will show the linked cell of hidden sheet.
3-When I come back the common two sheet other hidden sheets will be hidden automatically.
I have attached the images and Excel sheet. Please if you can solve the problem with that excel file.
N.B:
a- Flow chart - GL 01 and Flow chart - GL 02 will not hidden and Scope of Improvement(GL-01), Scope of Improvement(GL-02), Work Ins. ( Color & Flavour) sheets will be hidden and will be linked Flow chart - GL 01 with Scope of Improvement(GL-01), Flow chart - GL 02 with Scope of Improvement(GL-02) as well
b-When linked cells will be clicked then will open the hidden excel file and the targeted cell which I want to go.
e.g. If I clicked glucose unloading drum from Flow chart - GL 01 will go to Scope of Improvement(GL-01 sheet and to Glucose Unloading cell as well.
There I have indicated some cell by red color which need to be targeted and also be hidden automatically when I come back to any of Flow chart - GL 01 and Flow chart - GL 02 sheets.
 
Upvote 0
I can't able upload the excel file here. Could you please give me your mail ID?
I am totally unfamiliar from vba coding. could you please help me? which I wanted that 2 common sheet will opened rest will be hidden. When I click any linked cell from the common sheet then the hidden linked sheet will open with the targeted cells which I want to show. So no need to find out the rows or column there because the cell will show that. Could you please help me sir? There need to linked many cell to hidden sheet and also while come back to common sheet others will be hidden automatically.
 

Attachments

  • Img-1.JPG
    Img-1.JPG
    127.4 KB · Views: 2
  • img-2.JPG
    img-2.JPG
    121.1 KB · Views: 2
Upvote 0
1. It is customary to offer feedback when you are provided with a solution - did reply in post#2 answer your original question?

2. Post #3 is a different request to your original question and therefore should be started on a NEW thread
 
Upvote 0

Forum statistics

Threads
1,214,636
Messages
6,120,669
Members
448,977
Latest member
moonlight6

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