Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-16-2023, 04:50 PM
Jrod9190 Jrod9190 is offline VBA to clear all text boxes, not delete them Windows 11 VBA to clear all text boxes, not delete them Office 2019
Novice
VBA to clear all text boxes, not delete them
 
Join Date: Jan 2023
Posts: 7
Jrod9190 is on a distinguished road
Talking


Quote:
Originally Posted by gmaxey View Post
I have to agree with Graham regarding your choice of text boxes. But if there is some reason you must use what you have then perhaps:

Code:
Sub ScratchMacro()
Dim oShp As Shape
'A basic Word Macro coded by Gregory K. Maxey
  On Error Resume Next
  For Each oShp In ActiveDocument.Shapes
    oShp.TextFrame.TextRange.Text = ""
  Next oShp
lbl_Exit:
  Exit Sub
End Sub
This code worked like a charm, thanks!
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA to clear all text boxes, not delete them Word 2013 Text boxes on everything, can't select across multiple boxes 1Kurgan1 Word 2 10-31-2016 01:20 AM
VBA to clear all text boxes, not delete them Drawing lines between text boxes which have actual text within the text boxes RHODIUM Word 6 10-01-2016 04:43 PM
Text inside text boxes create headings inside my table of contents!!! How do I delete the created he carstj Word 3 04-11-2016 12:46 PM
VBA to clear all text boxes, not delete them please help, need formating a .doc with simple fillable text boxes and picture boxes olson109 Word 5 03-12-2014 01:02 AM
Word2010 check boxes and plain text content control boxes in same table fcsungard Word 5 06-01-2012 01:16 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:55 AM.


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