Unhide row on hyperlink click

adamsm

Active Member
Joined
Apr 20, 2010
Messages
444
Hi,

How could I unhide rows 8:13 when I click the hyperlink on C7.

Suppose I have the text "me" in cell C7, when I click the hyperlink I want the rows to get unhidden.

Any help on this would be kindly appreciated.
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Hi,

How could I unhide rows 8:13 when I click the hyperlink on C7.

Suppose I have the text "me" in cell C7, when I click the hyperlink I want the rows to get unhidden.

Any help on this would be kindly appreciated.


Try this

Places this in the SheetModule

Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)

If Target.Address = "$C$7" Then
   If Rows("8").Hidden = True Then
      ActiveSheet.Rows("8:13").Hidden = False
    
   Else
      ActiveSheet.Rows("8:13").Hidden = True
   End If
End If
   
End Sub

This toggles hidded/unhidden based on the cell C7 getting the focus

It only changes when you click in to c7 the first time

so click somewhere else and then back into C& and it will toggle
 
Upvote 0
Maybe the follow hyperlink event:

Code:
Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)

If Target.Parent.Address = "$C$7" Then ActiveSheet.Range("8:13").Rows.Hidden = False

End Sub

Gary
 
Upvote 0

Forum statistics

Threads
1,224,587
Messages
6,179,733
Members
452,939
Latest member
WCrawford

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