+ Reply to Thread
Results 1 to 7 of 7

vba to delete empty cell with bookmark.

  1. #1
    Forum Contributor
    Join Date
    07-17-2012
    Location
    India
    MS-Off Ver
    Excel 2016
    Posts
    713

    vba to delete empty cell with bookmark.

    hi,

    below code does the job nicely of deleting the empty rows in word document. Need help in tweaking this code to delete the empty rows with bookmark as well. Please assist.

    Please Login or Register  to view this content.
    Keep the Forum clean :


    1. Use [ code ] code tags [ /code ]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    2. Show appreciation to those who have helped you by clicking * Add Reputation below their posts.
    3. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

  2. #2
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,726

    Re: vba to delete empty cell with bookmark.

    It would be helpful if you said what the bookmark applies to (e.g. a whole table, a whole row or column, multiple cells, a single whole cell, text in a cell); it would be even more helpful if you posted structured code...
    Cheers,
    Paul Edstein
    [Fmr MS MVP - Word]

  3. #3
    Forum Contributor
    Join Date
    07-17-2012
    Location
    India
    MS-Off Ver
    Excel 2016
    Posts
    713

    Re: vba to delete empty cell with bookmark.

    Hello,

    As i am creating a table with each table field to be filled with different data from excel, the bookmark that i did is around 68 in order to achieve this. This is the code above that i pasted is the code that does the job of deleting all blank cells from table. But as i have bookmark in it, it doesnt consider it has blank and hence doesnt it.

    Do let me know if am still confusing

    Thanks

  4. #4
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,726

    Re: vba to delete empty cell with bookmark.

    Your understanding of bookmarks is erroneous; they don't occupy any space and are incapable of causing your macro to consider as cell to not be blank. You should check what else is in the cell. It's also not apparent why you need bookmarks to populate the Word table.

  5. #5
    Forum Contributor
    Join Date
    07-17-2012
    Location
    India
    MS-Off Ver
    Excel 2016
    Posts
    713

    Re: vba to delete empty cell with bookmark.

    This word attached can help to put us on same page. As you can see, for each letter preparared second page will have this section. With help of book mark, i can increase or decrease the content. Later part i want to delete blank cell.


    With above macro i posted, it doesnt delete the cell, unless i remove the bookmark ( By pressing select and pressing delete button). When i do that book mark gets deleted and when i run the macro, the empty rows get deleted.
    Attached Files Attached Files

  6. #6
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,726

    Re: vba to delete empty cell with bookmark.

    As I suspected, you have other content in every cell - an unnecessary non-breaking space.

  7. #7
    Forum Contributor
    Join Date
    07-17-2012
    Location
    India
    MS-Off Ver
    Excel 2016
    Posts
    713

    Re: vba to delete empty cell with bookmark.

    Oh.. am so sorry.. I didnt even get hitch of it. Sorry to waste your time, my apologies.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Delete bookmark AND trailing paragraphs
    By ldoodle in forum Word Programming / VBA / Macros
    Replies: 3
    Last Post: 06-24-2018, 06:59 PM
  2. Replies: 1
    Last Post: 05-26-2014, 01:31 PM
  3. [SOLVED] Delete rows if cell is empty
    By xlssw in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-18-2013, 04:49 PM
  4. [SOLVED] still have empty cell after run Delete empty cells code
    By tuongtu3 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-25-2012, 04:28 PM
  5. delete cells in row if first cell is not empty
    By timtim89 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-05-2012, 04:25 PM
  6. Replies: 1
    Last Post: 09-30-2011, 06:00 AM
  7. Delete empty spaces in cell
    By sakinen in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-20-2009, 04:47 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1