Results 1 to 2 of 2

Thread: New number after every print

  1. #1

    New number after every print



    Register for a FREE account, and/
    or Log in to avoid these ads!

    I am trying to make script witch chanse ceartin number after every print. It must ask how many copys and wht is first number.


    Code:
    Sub PrintCopies_ActiveSheet()
    
     Dim CopiesCount As Long
     Dim copynumber As Long
     Dim algusnumber As Long
    
     CopiesCount = Application.InputBox("How many copies do you want?", Type:=1)
     algusnumber = Application.InputBox("First number", Type:=1)
    
     For copynumber = algusnumber To CopiesCount
     With ActiveSheet
        .Range("B1").Value = copynumber
        .PrintOut
     End With
     Next copynumber
     End Sub
    for some reason it wount work.

  2. #2
    Magician NoS's Avatar
    Join Date
    Jan 2013
    Location
    British Columbia
    Posts
    751
    Articles
    0
    Excel Version
    Excel 2010 64bit
    If "How many copies do you want?" is 10 and
    if "First number" is 125

    then your code says
    For copynumber = 125 to 10

    should that maybe be
    For copynumber = 125 to 125+10 ?

Posting Permissions

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