Consulting

Results 1 to 4 of 4

Thread: Solved: delete content after save

  1. #1

    Solved: delete content after save

    hi all,

    can someone provide me using vba how to delete values for columns B6:B2000.

    many thanks for ur help

    reza

  2. #2
    Moderator VBAX Guru Simon Lloyd's Avatar
    Joined
    Sep 2005
    Location
    UK
    Posts
    3,003
    Location
    We need more info to help you properly but.........[VBA]Range("B6:B2000").ClearContents[/VBA]
    Regards,
    Simon
    Please read this before cross posting!
    In the unlikely event you didn't get your answer here try Microsoft Office Discussion @ The Code Cage
    If I have seen further it is by standing on the shoulders of giants.
    Isaac Newton, Letter to Robert Hooke, February 5, 1675 English mathematician & physicist (1642 - 1727)

  3. #3
    my mistake,
    i didn't explain clearly...

    after saving my file, i need to delete any values for only in col B6:B2000.

    yesterday you gave me a vba for saving file
    http://www.vbaexpress.com/forum/showthread.php?t=33697
    now, i want to modify a little, after saving file can col B6:B will delete values in that cells.

    thanks

  4. #4
    Moderator VBAX Guru Simon Lloyd's Avatar
    Joined
    Sep 2005
    Location
    UK
    Posts
    3,003
    Location
    If you clear values or make changes when you close the workbook you will still be asked to save the changes!, that said the code i gave you above will clear those values.
    Regards,
    Simon
    Please read this before cross posting!
    In the unlikely event you didn't get your answer here try Microsoft Office Discussion @ The Code Cage
    If I have seen further it is by standing on the shoulders of giants.
    Isaac Newton, Letter to Robert Hooke, February 5, 1675 English mathematician & physicist (1642 - 1727)

Posting Permissions

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