![]() |
|
#1
|
|||
|
|||
![]()
Hi guys,
I'm looking for a macro for a toggle button (ShowHide) that will show an image in my document when I click on the button in the custom header and will disappear again when I click on it again. The image is saved as a building block (Interim) and should be inserted in Table 1 Row 4 cell 2. I can't get it to work on my own. Thanks a lot!! Lodi |
#2
|
||||
|
||||
![]()
The following macro will do that
Code:
Sub TogglePicture() Dim oRng As Range Dim oShape As InlineShape Set oRng = ActiveDocument.Tables(1).Cell(4, 2).Range With oRng.InlineShapes(1) If .PictureFormat.Brightness = 1 Then .PictureFormat.Brightness = 0.5 Else .PictureFormat.Brightness = 1 End If End With End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
![]() |
Tags |
hide, show, togglebutton |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
eugzl | PowerPoint | 2 | 12-29-2015 12:40 PM |
![]() |
abutahir | Excel | 4 | 11-03-2015 01:07 PM |
Toggle Button takes focus and thus changes selection | NobodysPerfect | Word VBA | 1 | 10-11-2014 04:20 AM |
![]() |
Squibble | Word VBA | 2 | 06-11-2014 05:36 PM |
Header must toggle text & color + show count of conditionally formatted cells below | Franktoon | Excel | 3 | 02-18-2014 02:10 PM |