Results 1 to 7 of 7
  1. #1
    2 Star Lounger
    Join Date
    Jul 2001
    Posts
    132
    Thanks
    0
    Thanked 0 Times in 0 Posts

    printing a form (2000-sr-1)

    Hello again,

    I have a customized user form with a button on it that I made. I want this button to print out the user form and only the user form when i Press it, What code do i have to put in to make this work?

    I tried the obvious first

    userform1.print

    but then I got the error "object does not support property or method" so now what do i do?

    thanks in advance for your responses

  2. #2
    2 Star Lounger
    Join Date
    Jul 2001
    Posts
    132
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: printing a form (2000-sr-1)

    Okay, so i figured out how to print it.

    Must use userform1.printform

    But noe the question is how do you get it centered on the page and the title bar of the form to show up on the printout. I am sure it just got cutoff because of the way the printing is set up.

  3. #3
    ralph_davies
    Guest

    Re: printing a form (2000-sr-1)

    I have a similar problem
    I want to print the form Landscape
    Does anyone know how to set the users default printer to landscape from VB

  4. #4
    ralph_davies
    Guest

    Re: printing a form (2000-sr-1)

    You may be able to use Zoom to resize your printout
    the following zooms a userform called ARForm which is 410 high by 600 wide by 135%
    ARForm.Zoom = 135
    ARForm.Height = 410 * (ARForm.Zoom / 100)
    ARForm.Width = 600 * (ARForm.Zoom / 100)
    if you put your form dimensions in and zoom by say 75 you might get what you want
    You can also use StartUpPosition in the properties window to center the form

  5. #5
    Bronze Lounger
    Join Date
    Jun 2001
    Location
    New York, New York, Lebanon
    Posts
    1,449
    Thanks
    1
    Thanked 1 Time in 1 Post

    Re: printing a form (2000-sr-1)

    Ralph

    If you want to change the printer orientation then you can use the following example:


    Sub ChangeOrientation()
    With ActiveSheet.PageSetup
    .Orientation = xlLandscape
    End With
    End Sub


    Wassim
    <img src=/S/compute.gif border=0 alt=compute width=40 height=20> in the <img src=/S/bagged.gif border=0 alt=bagged width=22 height=22>

  6. #6
    ralph_davies
    Guest

    Re: printing a form (2000-sr-1)

    Thanks
    This works fine for printing worksheets
    Unfortunatly it doesn't seem to work for printing a userform

  7. #7
    Bronze Lounger
    Join Date
    Jun 2001
    Location
    New York, New York, Lebanon
    Posts
    1,449
    Thanks
    1
    Thanked 1 Time in 1 Post

    Re: printing a form (2000-sr-1)

    Ralph

    Userforms do not have page setup settings.

    Wassim
    <img src=/S/compute.gif border=0 alt=compute width=40 height=20> in the <img src=/S/bagged.gif border=0 alt=bagged width=22 height=22>

Posting Permissions

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