Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-18-2024, 02:17 PM
p45cal's Avatar
p45cal p45cal is offline Macro to toggle strikethrough? Windows 10 Macro to toggle strikethrough? Office 2021
Expert
 
Join Date: Apr 2014
Posts: 962
p45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond repute
Default

A whole cell:


Code:
Range("A1").Font.Strikethrough = True
Part of the text of a cell:
Code:
Range("A1").Characters(Start:=3, Length:=4).Font.Strikethrough = True
In both cases, if the range is multicelled, contiguous or not, all the cells will be affected.

To toggle:
Code:
Range("A1").Font.Strikethrough = Not Range("A1").Font.Strikethrough
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Toggle on & off Allow in-cell editing -or- a macro to do this Covert Codger Outlook 7 03-05-2024 02:44 PM
Macro for zooming toggle dovel Word 2 07-31-2020 02:32 PM
Macro to toggle strikethrough? Superscript directly above strikethrough bowlfreak_not Word 1 07-04-2018 03:36 PM
Macro to toggle strikethrough? Macro to toggle outline level Jennifer Murphy Word VBA 3 01-22-2014 11:22 PM
Macro to toggle outline level Jennifer Murphy Word VBA 0 07-08-2013 08:20 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 10: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