![]() |
#1
|
|||
|
|||
![]()
Hello,
A process is filling a words document (MS Words 2007). A table in this document has 60 row's. Depending on the process there are 1 or all 60 rows filled. Every cell has a bookmark. (3 cells in a row, number, problem, solution) I know how to find the cells and how to select and delete the row. I want delete the empty rows starting at the end. When there is data/content, than stop macro. My problem is: 1 How do I check the cell if its empty? 2 Do I have to repeat the routine 60 times, or is there a other way? This is what I have: Sub DeleteLegeRegel() Selection.GoTo What:=wdGoToBookmark, Name:="Prob60" (CHECK CEL FOR DATA, HOW?) If empty Then Selection.Expand (wdRow) Selection.Cut Selection.GoTo What:=wdGoToBookmark, Name:="Prob59" (CHECK CEL FOR DATA, HOW?) If empty Then Selection.Expand (wdRow) Selection.Cut Selection.GoTo What:=wdGoToBookmark, Name:="Prob58" Else Selection.GoTo What:=wdGoToBookmark, Name:="Prob59" End If End Sub It shout be simple, but I can't find a proper example. ![]() Grtz Vincent |
Tags |
empty cell delete row |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
braddgood | Word VBA | 15 | 10-02-2015 01:54 PM |
![]() |
Linh | Word Tables | 1 | 09-21-2014 01:52 PM |
Creating VBA Code to Delete Empty Column in Table | Faugs | Word VBA | 5 | 08-07-2014 03:29 PM |
Delete lots of empty space between paragraphs. | FieldTechnician | Word | 4 | 10-25-2013 01:14 PM |
![]() |
ubns | Excel Programming | 2 | 08-14-2012 02:01 AM |