Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Private Sub ToggleButton1_Click()
- new_caption = ToggleButton1.Caption
- Dim height As Integer
- If new_caption = "Show" Then
- new_caption = "Hide"
- height = 125
- Else
- new_caption = "Show"
- height = ToggleButton1.height
- End If
- ToggleButton1.Caption = new_caption
- Range(ToggleButton1.LinkedCell).RowHeight = height
- End Sub
- A B
- +--------------------+--------+
- 1 | Long text which is | [Hide] |
- | wrapped because | |
- | the state is SHOW. | |
- +--------------------+--------+
- 2 | More text which is | [Hide] |
- | wrapped because | |
- | the state is SHOW. | |
- +--------------------+--------+
- 3 | Hidden text becaus | [Show] |
- +--------------------+--------+
- 4 | Even more text | [Hide] |
- | that's wrapped | |
- | because the state | |
- | is SHOW. | |
- +--------------------+--------+
Add Comment
Please, Sign In to add comment