![]() |
#1
|
|||
|
|||
![]()
How do I selected the highlighted rows with 1 operation. Alt+Shift+end only allow me to select 1 one at a time.
I try to code in VBA, but I dont know how to start. Thanks |
#2
|
||||
|
||||
![]()
Cross-posted at:
Select multi row in Word table - Stack Overflow Select multiple rows in Word table - MS Answers For cross-posting etiquette, please read: A message to forum cross posters - Excelguru Note: This is the second time in less than 24 hours that I've pinged you for cross-posting without applying the expected etiquette. Do it again and I'll terminate your account here.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
![]()
Hi,
I am sorry for the convenient. Would it be possible that you can help me with this question. I cant find the answer for this |
#4
|
||||
|
||||
![]()
As I already told you at StackOverflow, VBA cannot select discontiguous ranges. Manually, all you need do is select the first row, then hold down the Ctrl key whilst selecting the second row.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#5
|
|||
|
|||
![]()
Can I have your advice on this. I am working on VBA to look for a multiple text in table and highlight the corresponding rows. I am struggling with it. Can I have your advice?
|
#6
|
|||
|
|||
![]()
this is the code I have so far.This code helps me find the list of input "AAAA", "BBBB", "CCCC", "DDDD" and highlight the rows have that value. However; it only highlights the row has 1st input "AAAA", but not "BBBB", "CCCC", and "DDDD" row.
Sub FindMultiItemsInDoc() Dim objListDoc As Document Dim objTargetDoc As Document Dim objParaRange As Range, objFoundRange As Range Dim objParagraph As Paragraph Dim strFileName, arrM As String Dim arr() As String strFileName = InputBox("Enter the full name of the list document here:") arr = Split(strFileName, ",") For i = LBound(arr) To UBound(arr) arrM = arr(i) Application.ScreenUpdating = False With ActiveDocument.Range With .Find .ClearFormatting .Replacement.ClearFormatting .Text = arrM .Replacement.Text = "" .Forward = True .Wrap = wdFindStop .Format = False .MatchWildcards = True .Execute End With Do While .Find.Found If .Information(wdWithInTable) = True Then .Rows(1).Range.HighlightColorIndex = wdYellow End If .Collapse wdCollapseEnd .Find.Execute Loop End With Application.ScreenUpdating = True Next i End Sub |
#7
|
||||
|
||||
![]()
Kindly read my reply about code formatting in: https://www.msofficeforums.com/word-...new-table.html
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
![]() |
Thread Tools | |
Display Modes | |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Help, to Select all Rows with color Orange...... | Cendrinne | Word VBA | 0 | 02-08-2022 02:59 AM |
5000 rows, want to select and perform addition on ever 48 rows | Rexmaverick | Excel | 5 | 06-10-2019 06:29 AM |
Need to apply Heading1 to select rows | bobk544 | Word VBA | 3 | 06-09-2018 05:24 AM |
![]() |
LarryHills | Excel | 1 | 02-17-2017 03:55 PM |