+ Reply to Thread
Results 1 to 8 of 8

MsgBox to give user print options

  1. #1
    Registered User
    Join Date
    01-10-2012
    Location
    Aruba
    MS-Off Ver
    Excel 2007
    Posts
    48

    MsgBox to give user print options

    Hi you'll,

    To make this easier to understand a copy of the mentioned wb is attached.

    I am building a workbook for teachers to keep track of the grades from their students. It has 2 sheets: the first keeps track of student info and the subjects given, the second copies a lot of the first sheet's info and has space to input the grades.
    Simple formulas are used to copy info from sheet 1 to sheet 2.
    The grades in sheet 2 are in the end calculated to an average, which will be the grade on the report card.

    With the use of several different codes, certain columns and rows are hidden in the second sheet. When a value for the students name is not entered in sheet 1, the whole lot of columns concerning this student are hidden in sheet 2. The same thing happens when a certain subject in sheet 1 is blank: all the rows in sheet 2 are hidden concerning this subject. I did this to make it easier to use (why show info that the user does not need?).

    At the end of a trimester, when all the grades are entered and the report cards are ready to be made (not through this workbook), I like the teachers to be able to print the grades from every student. The code for this is attached to a button, when clicked, selects the info (searches for the last entry) and prints the page(s). The codes I got through sites similar like this and changed a bit. They work good.
    I like a msg box to pop up (which it does) and give the user options how to print (i.e. color, amount of copies, fast draft, etc). The msgbox pops up and asks the user: "Do you like to print in color or grey scale?" Options: Color, grey scale and cancel.
    So far I have only found ideas concerning selecting printers, and the one in "my" code.

    How do I give the users the option how to print? The examples listed are just thoughts. When I get the general idea, I might be able to figure it out.

    My eternal thanks,

    marcoAUA.Grades.xlsm

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: MsgBox to give user print options

    STry
    Please Login or Register  to view this content.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    01-10-2012
    Location
    Aruba
    MS-Off Ver
    Excel 2007
    Posts
    48

    Re: MsgBox to give user print options

    Thanks Roy, that works.

    You only need to fire this, can this be done automatically? When the print button is hit, the printer setup dialog pops up?

    marcoAUA.

    I'm thinking about something. This wb is meant to be used by several people, on their own pc. This print set up will then select their printer options and not the ones from my pc?
    Last edited by MarcoAUA; 03-06-2012 at 01:18 PM.

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: MsgBox to give user print options

    Try this

    Please Login or Register  to view this content.
    Worksheet event code is stored on a worksheet module. To add it to your worksheet, do the following:

    Copy the code
    Select the worksheet in which you the code to run
    Right click on the sheet tab and choose View Code, to open the Visual Basic Editor.
    Where the cursor is flashing, choose Edit | Paste

  5. #5
    Registered User
    Join Date
    01-10-2012
    Location
    Aruba
    MS-Off Ver
    Excel 2007
    Posts
    48

    Re: MsgBox to give user print options

    Please Login or Register  to view this content.
    Thanks for the reply.

    I am getting a litle lost. The following macro I have in Module1. This sets the range that I like to print.

    In the Sheet Module I have
    Please Login or Register  to view this content.
    This should make sure that the user can set the print options.

    The macro works fine. The first code that you provided worked (but not automatically). THe 2nd code you suggested does not work?
    Should it be in the workbook module?

    MarcoAUA

  6. #6
    Registered User
    Join Date
    01-10-2012
    Location
    Aruba
    MS-Off Ver
    Excel 2007
    Posts
    48

    Re: MsgBox to give user print options

    I am re-grouping.
    Till I find out what I need to do, with what codes, which need to do this or that, I will make a new thread.

    You will be hearing from me.

    Thnaks for the time and effort,

    marcoAUA.

  7. #7
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: MsgBox to give user print options

    I added notes where to put my last code - not in Module1

  8. #8
    Registered User
    Join Date
    01-10-2012
    Location
    Aruba
    MS-Off Ver
    Excel 2007
    Posts
    48

    Re: MsgBox to give user print options

    I know, I did put it in the worksheet module but mentioned hat i put it in the module 1.

    THNX for staying with this.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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