Guest User

Untitled

a guest
Jun 23rd, 2018
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. Private Sub ToggleButton1_Click()
  2. new_caption = ToggleButton1.Caption
  3. Dim height As Integer
  4. If new_caption = "Show" Then
  5. new_caption = "Hide"
  6. height = 125
  7. Else
  8. new_caption = "Show"
  9. height = ToggleButton1.height
  10. End If
  11. ToggleButton1.Caption = new_caption
  12. Range(ToggleButton1.LinkedCell).RowHeight = height
  13. End Sub
  14.  
  15. A B
  16. +--------------------+--------+
  17. 1 | Long text which is | [Hide] |
  18. | wrapped because | |
  19. | the state is SHOW. | |
  20. +--------------------+--------+
  21. 2 | More text which is | [Hide] |
  22. | wrapped because | |
  23. | the state is SHOW. | |
  24. +--------------------+--------+
  25. 3 | Hidden text becaus | [Show] |
  26. +--------------------+--------+
  27. 4 | Even more text | [Hide] |
  28. | that's wrapped | |
  29. | because the state | |
  30. | is SHOW. | |
  31. +--------------------+--------+
Add Comment
Please, Sign In to add comment