+ Reply to Thread
Results 1 to 2 of 2

Will only print one???

  1. #1
    Registered User
    Join Date
    10-24-2005
    Posts
    55

    Will only print one???

    HI thanks for the past help

    But i have a small problem

    He is my code (im using a user form)

    Private Sub CommandButton1_Click()
    If OptionButton1 Then
    Sheets("S32 worksheet").Select
    Dim ws As Worksheet
    Dim no_of_copies As Integer
    no_of_copies = Application.InputBox("How many copies do you wish to print ", , 1)
    If no_of_copies = 0 Then Exit Sub
    MsgBox ("NOTE : A MEASURE SHEET MUST BE ATTACHED WITH THIS WORKSHEET. IF NOT THIS SHEET IS NOT VALID AND NO PRODUCTION SHOULD BE MADE")
    ActiveWindow.SelectedSheets.PrintOut , Collate:=True
    Sheets("S32 input").Select
    ElseIf OptionButton2 Then
    Sheets("S32 worksheet").Select
    ActiveWindow.Zoom = 75
    ElseIf OptionButton3 Then
    Sheets("Heroal main page ").Select
    ElseIf OptionButton4 Then
    Sheets("s32mea").Select
    no_of_copies = Application.InputBox("How many copies do you wish to print ", , 1)
    If no_of_copies = 0 Then Exit Sub
    ActiveWindow.SelectedSheets.PrintOut , Collate:=True
    Sheets("S32 input").Select
    End If
    Unload Me
    Close
    End Sub

    But the problem is when the input box appears asking how many copies do you wish to print if you put 5 in it still only prints 1

    Need help

    Thanks

  2. #2
    Dave Peterson
    Guest

    Re: Will only print one???

    Without looking at the rest of your code, I don't see where you used that
    no_of_copies variable:

    ActiveWindow.SelectedSheets.PrintOut collate:=True, copies:=no_of_copies



    raw wrote:
    >
    > HI thanks for the past help
    >
    > But i have a small problem
    >
    > He is my code (im using a user form)
    >
    > Private Sub CommandButton1_Click()
    > If OptionButton1 Then
    > Sheets("S32 worksheet").Select
    > Dim ws As Worksheet
    > Dim no_of_copies As Integer
    > no_of_copies = Application.InputBox("How many copies do you wish to
    > print ", , 1)
    > If no_of_copies = 0 Then Exit Sub
    > MsgBox ("NOTE : A MEASURE SHEET MUST BE ATTACHED WITH THIS WORKSHEET.
    > IF NOT THIS SHEET IS NOT VALID AND NO PRODUCTION SHOULD BE MADE")
    > ActiveWindow.SelectedSheets.PrintOut , Collate:=True
    > Sheets("S32 input").Select
    > ElseIf OptionButton2 Then
    > Sheets("S32 worksheet").Select
    > ActiveWindow.Zoom = 75
    > ElseIf OptionButton3 Then
    > Sheets("Heroal main page ").Select
    > ElseIf OptionButton4 Then
    > Sheets("s32mea").Select
    > no_of_copies = Application.InputBox("How many copies do you wish to
    > print ", , 1)
    > If no_of_copies = 0 Then Exit Sub
    > ActiveWindow.SelectedSheets.PrintOut , Collate:=True
    > Sheets("S32 input").Select
    > End If
    > Unload Me
    > Close
    > End Sub
    >
    > But the problem is when the input box appears asking how many copies do
    > you wish to print if you put 5 in it still only prints 1
    >
    > Need help
    >
    > Thanks
    >
    > --
    > raw
    > ------------------------------------------------------------------------
    > raw's Profile: http://www.excelforum.com/member.php...o&userid=28312
    > View this thread: http://www.excelforum.com/showthread...hreadid=480286


    --

    Dave Peterson

+ 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