+ Reply to Thread
Results 1 to 5 of 5

Print and move cells up

  1. #1
    Registered User
    Join Date
    02-14-2005
    Posts
    69

    Exclamation Print and move cells up

    Hi all,

    I have a question about shifting cells up in VBA. I have seen alot of posts while searching, with descriptions on how to hide whole rows, or deleting cells but what I need to do is this...

    I have a blank column A and then parts listed in column B,C,D and E.

    When I click on the Print button (macro that I have created) I want it to HIDE cells in B,C,D,E and shift the cells UP so that no blanks are visible. Then Print out

    Can this be done???????

    Thanx heaps

  2. #2
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    Assuming there are various blanks in column A, before printout, you could use:

    Please Login or Register  to view this content.
    Then, after printout, you can just unhide all of the blanks:

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    02-14-2005
    Posts
    69

    Talking

    Thanx muchly!!! Worked perfectly....

    sooooooo....how would I write a VBA code to do the same thing for columns then???

    I copied your other code into my macro button, but how do I get it to hide columns that have nothing in them and unhide them after printing??

    Thanx in advance and again for the last help

  4. #4
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    You would just need to change myrng and the two hidden properties.

    Before printout:
    Please Login or Register  to view this content.
    After printout:
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    02-14-2005
    Posts
    69

    Question

    Sorry to bother AGAIN,

    but I got an error message that said...Method 'Range' of object_Global' Failed

    What does this mean and how do I fix it???

    Tar again

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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