+ Reply to Thread
Results 1 to 7 of 7

hiding columns when printing

  1. #1
    Registered User
    Join Date
    03-13-2007
    Posts
    40

    hiding columns when printing

    hopefull this is it for tonight, Paul you have been extremely helpful.

    in another application, i am using excel for quotes and invoicing. two fold questions

    1. i would like to have a column that shows my cost on items, as well as a column for the price to the customer. is there a way to hide the "cost" column when it's time to print?

    the columns would be in this order.

    quantity
    discription
    my cost
    unit price
    total

    the cost column would not need to have anything to do with formulas, just the wholesale cost of the item for my convenience. but i would need to hide it when i printed the quote. even when i email quotes, it would still be "printed", as i print to acrobat and make a pdf to email.


    2. is there a simply way to turn a quote into an invoice?

    thanks for your time and help.

  2. #2
    Forum Contributor
    Join Date
    04-18-2006
    Posts
    135
    For the first question why dont you just hide the my cost column? Right click on the column letter and select hide

  3. #3
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885
    If you want to hide it programatically, you can use something like:
    Please Login or Register  to view this content.
    This way, if you forget to manually hide the column, it will hide it before you print (or print preview even).

  4. #4
    Registered User
    Join Date
    03-13-2007
    Posts
    40
    do i put this string of code in the cell as a formula?

  5. #5
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885
    Nope.. press ALT+F11 to open the VBA window. You should see VBA Project (Your_file_name.xls) in the left-hand pane. Below that you'll see Sheet1, Sheet2, etc.. and then 'ThisWorkbook'.

    Double-click on 'ThisWorkbook', then paste this code into the right-hand pane. Close the VBA window, save your workbook.

    Click the Print Preview toolbar button, and you'll see that column C has been hidden. If you meant to hide another column, change the "C:C" in the code to that column (e.g. "F:F" or "AR:AR")

  6. #6
    Registered User
    Join Date
    03-13-2007
    Posts
    40
    much thanks.... i'll give this a try

  7. #7
    Registered User
    Join Date
    03-13-2007
    Posts
    40
    believe it or not, i am just getting to try this... i had given up on my excel stuff until now when i had some more time to work on it.

    this is the error i am getting trying to hide column "I"

    runtime error (9)
    subscript out of range

    here is what i put in

    Please Login or Register  to view this content.
    i see my sheet 1 which looks like this... it has my sheet name on it...

    Sheet1 (Uhlik Install Quote)

    once i understand how to hide a single column, i really need to hide columns I, J, K, L

    thanks

    :o)
    Last edited by sisterpete; 12-21-2007 at 09:57 PM.

+ 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