Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 03-15-2017, 09:34 PM
gmayor's Avatar
gmayor gmayor is offline Toggle button to show and hide image Windows 10 Toggle button to show and hide image Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,143
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

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
Reply With Quote
 

Tags
hide, show, togglebutton



Similar Threads
Thread Thread Starter Forum Replies Last Post
Toggle button to show and hide image option button show/hide group of fields eugzl PowerPoint 2 12-29-2015 12:40 PM
Toggle button to show and hide image Want to show/hide mutiple grouped coloumns in Excel sheet with a button 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
Toggle button to show and hide image Toggle Button 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

Other Forums: Access Forums

All times are GMT -7. The time now is 02:13 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft