Unhide rows as VBA event trigger

cbrown6305

New Member
Joined
Nov 12, 2018
Messages
13
Office Version
  1. 2016
Platform
  1. Windows
I have a text box that unhidden via a sub called "unHideTextBox". I want this sub triggered when unhiding a certain row. Practically, when a user opens the workbook, the row would be hidden, when they click the "+" to unhide the row, the text box becomes visible. When they hide the row, the text box goes back to being invisible.

This is what i have, but it is not triggering the text box...


Private Sub Worksheet_Change(ByVal Target As Range)

If Target.Row = 35 Then
If Rows("35:35").EntireRow.Hidden = False Then
Call unHideTextBox
End If

End If

End Sub
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
I'm not clear what you intend to happen, but your Sub will call unHideTextBox if:

- the user changes something on the worksheet, and
- the first row of the changed cell(s) is 35, and
- row 35 is not hidden.

When you say click the "+" to unhide the row, are you talking about grouped rows? While a grouped row doesn't show, that doesn't mean it's .Hidden

And grouping/ungrouping won't trigger a Worksheet_Change.
 
Upvote 0
Please take a minute to read the forum rules, especially on cross-posting, and then update your thread with the relevant links. Thanks. :)
 
Upvote 0

Forum statistics

Threads
1,215,061
Messages
6,122,921
Members
449,094
Latest member
teemeren

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