rakesh seebaruth
Active Member
- Joined
- Oct 6, 2011
- Messages
- 303
Hi Guys
I have the attached table which is bookmarked.
When i execute the macro , the bookmarks are filled from A to E.
I would like vba to delete all blanks rows in the table if cells in sheet are empty.(Let's Cell A is Sun and Cell B to E are empty)
My vba are as follows :-
Thanks
I have the attached table which is bookmarked.
When i execute the macro , the bookmarks are filled from A to E.
I would like vba to delete all blanks rows in the table if cells in sheet are empty.(Let's Cell A is Sun and Cell B to E are empty)
My vba are as follows :-
VBA Code:
With Sheets("security")
LastRow = .Range("E9999").End(xlUp).Row 'Determine Last Row in Table
For CustRow = 8 To LastRow
For CustCol = 5 To 9 'Move Through 9 Columns
TagName = .Cells(7, CustCol).Value 'Tag Name
TagValue = .Cells(CustRow, CustCol).Value 'Tag Value
With objDoc
If .Bookmarks.Exists(TagName) Then
Set BkMkRng = .Bookmarks(TagName).Range
BkMkRng.Text = TagValue
End If
End With
Next CustCol
Next CustRow
End With
MsgBox "Complete"
End Sub
Thanks