Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-20-2016, 03:30 PM
gmaxey gmaxey is offline How to delete user input row and re-number column Windows 7 32bit How to delete user input row and re-number column Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,598
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default

Sub ScratchMacro()
'A basic Word macro coded by Greg Maxey
Dim oTbl As Table
Dim lngRow As Long
Dim oCC As ContentControl
Set oTbl = ActiveDocument.Tables(1)
lngRow = CLng(InputBox("What row?"))
For Each oCC In oTbl.Rows(lngRow).Range.ContentControls
oCC.LockContentControl = False
oCC.LockContents = False
Next
oTbl.Rows(lngRow).Delete


oTbl.Range.Fields.Update 'I assume you have numbered the rows with a Seq Field.
lbl_Exit:
Exit Sub
End Sub
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
User input box with IF statement ChrisJ83 Word VBA 9 11-13-2015 06:20 PM
Variable arrays from user input SeattleITguy Excel Programming 1 01-29-2015 09:19 AM
How to delete user input row and re-number column vba: user input named argument andrew12345 Excel Programming 2 11-18-2014 08:18 AM
How to delete user input row and re-number column User input to a variable on the document dsm1995gst Word VBA 1 09-03-2013 03:43 PM
How to delete user input row and re-number column Replacing text with user input.?.?.? brad1977 Word 3 11-20-2012 10:20 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:10 PM.


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