Results 1 to 3 of 3

Thread: Printing with VBA

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jun 2000
    Posts
    23

    Talking

    I am having a problem printing in excel using vba. I need to be able to select a range from B102 to G146, but print only the cells in this row that have data in them. Any help would be greatly appriciated.

    Steve Warker
    Stephen Warker

  2. #2
    Hyperactive Member billwagnon's Avatar
    Join Date
    Jul 1999
    Location
    St. Louis, Missouri, Mississippi Valley
    Posts
    290
    You could delete the rows without information by testing for empty cells and then print.

    If you can't delete the rows in your worksheet, copy it to a new sheet and delete rows in the new sheet. That way your original would stay the same.

    As far as deleting in a range, I would use a loop that moves across a given row. If it encounters anything, drop down to the next row. If it doesn't encounter anything, delete the row and start at the first cell of the next row.

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Jun 2000
    Posts
    23
    never mind, i figured it out using a for each and and if statement. Thanks everyone.

    Stve
    Stephen Warker

Posting Permissions

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



Click Here to Expand Forum to Full Width