Results 1 to 5 of 5

Loop not working

Threaded View

  1. #1
    Registered User
    Join Date
    12-18-2008
    Location
    Malta
    Posts
    14

    Loop not working

    HI

    So i have a user form asking for a From and To and the text boxes are currently name textbox1 and textbox2. A sheet called Pack Voucher picks up information from an other sheet called Packs List. I am basically asking the user to enter which pack voucher needs printing and print 2 copies of each Pack voucher.

    I came up with the following code by it is not working can someone help me..

    Private Sub OK_Click()
        Dim ws As Worksheet
        Set ws = Worksheets("PACK VOUCHER")
    
        
        Application.ScreenUpdating = False
        sono = TextBox1.Value
        ws.Range("K1").Value = sono.Value
        
        Do Until sono = TextBox2.Value
        
        ws.Range("K1").Value = sono.Value
        ActiveSheet.PrintOut Copies:=2
        sono = sono + 1
        Loop
        Sheets("PACKS LIST").Select
        Application.ScreenUpdating = True
        
    Unload Me
    End Sub
    I am quite sure that i have to define the "sono" but don't know where....can u help me out plssssssssss...


    Franco
    Last edited by blankus; 07-13-2009 at 05:18 PM.

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