Thanks Thanks:  0
Likes Likes:  0
Results 1 to 5 of 5

Thread: Please make my custom print button work

  1. #1
    New Member
    Join Date
    Mar 2002
    Posts
    31
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I want to print another form from a user input type form, so i guess i need some code to make it happen, someone did scrib up some code for me, but it did nothing, just printed the user form.

  2. #2
    New Member
    Join Date
    Mar 2002
    Posts
    31
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    keeping this on top cos i really need an answer!

  3. #3
    MrExcel MVP Anne Troy's Avatar
    Join Date
    Feb 2002
    Location
    Westwood NJ
    Posts
    2,582
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    How about:

    1. giving us a link to the code someone already gave you
    2. pasting the code in here
    3. telling us what happened when you ran the code
    4. give us more information
    5. all the above

    ??


    ~Anne Troy

  4. #4
    New Member
    Join Date
    Mar 2002
    Posts
    31
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    How about:

    1. giving us a link to the code someone already gave you
    2. pasting the code in here
    3. telling us what happened when you ran the code
    4. give us more information
    5. all the above

    Hmm I detect a little stress here, OK
    1 The link to the code someone alread gave me: http://www.mrexcel.com/board/viewtop...1136&forum=2&6
    2. The code:-

    Private Sub CommandButton1_Click()
    UserForm1.PrintForm
    End Sub

    3. When the code was run, instead of printing the 'other form' it only printed the form where the button was inserted, all six pages of it.

    4. more information:-
    I wanted to design an on screen type form for Risk Assessment, the type of thing where the user would input data using a mix of drop downs, check boxes, cells etc. I am half way through the input form and the body of the printed version of the form is done, I have made most of the links from the user input form to the output form. the forms are worksheets within the same workbook and has been created using Excel 2000. I am using windows 98 and have nortons antivurus software. My system is a P500 with 128 meg of ram a quad sound card, tv card, read write CD and 56 speed cd rom, a floppy disk and a 20 gig hard drive, i have two usb ports one with a camera fitted. I have a 15 in monitor, sitting next to the monitor is:- a blue cup, a desk tidy with various pens and clips etc in it, to it's right is a chordless telephone. to the far right of this lot is door which leads to my hallway, which houses an additional door to my iving room and the stair case. The staircase runs up the middle of the house to a landing which provides access to 3 bedrooms an airing cupboard and a bathroom, which has just been refitted. Back down the stairs and out of the front door and you will find my 10 year old rover 416 sitting on the gravelled drive. Now i'm not sure if this is enough information or not, but I sure would like some answers here.

  5. #5
    MrExcel MVP Mark O'Brien's Avatar
    Join Date
    Feb 2002
    Location
    Columbus, OH, USA
    Posts
    3,530
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    OK, I'm assuming that both userforms are instatiated and are visible. The focus and the print button is on Userform1, we want to print Userform2.

    So on commandbutton1_click on Userform1 put this code:


    Private Sub CommandButton1_Click()
    UserForm2.PrintForm
    End Sub


    HTH (If it does, then a utility company just gave you something for free. )

    _________________
    [b] Mark O'Brien

    [ This Message was edited by: Mark O'Brien on 2002-03-04 11:24 ]

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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