Results 1 to 4 of 4

User Input Boxes

Threaded View

  1. #1
    Registered User
    Join Date
    04-25-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    2

    User Input Boxes

    I have this macro that prints records based on a range that the user specifies. The only problem is that I'm still (trying to!) learning and would like to know how the code can be written so that the input box with ".....Starting Record" appears before and not after the input box ".......End Record" which is what is happening at the moment.

    Sub Print_All() 
        Application.Calculation = xlCalculationAutomatic 
        Application.ScreenUpdating = False 
        Application.DisplayAlerts = False 
        Dim x As Variant 
        Dim v As Variant 
        v = InputBox("Please enter the Ending Record number") 
        For i = InputBox("Please enter the Starting Record number") To v 
            x = i 
            Range("n2").FormulaR1C1 = x 
            Sheets("Deskingsheet").Select 
            ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True, _ 
            IgnorePrintAreas:=False 
             
        Next i 
    End Sub
    Thanks in advance

    Lee
    Last edited by arlu1201; 04-25-2012 at 01:20 PM. Reason: Code tags. Please use in future.

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