Results 1 to 11 of 11

Thread: Urgent - manual combo input

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #9
    I changed the code for ArrayFill() proc.:
    [vba]Private Sub ArrayFill()
    Dim r As Range

    Set DataXCollection = New Collection
    Set r = Worksheets("SheetX").Range("A1")

    Do Until r = ""
    'make sure we create a new instance of your custom type on every iteration
    Set dx = New DataX
    dx.CodeX = r.Text
    dx.PriceX = r.Offset(1).Value
    dx.ColorX = Application.Transpose(Range(r.Offset(, 1), r.Offset(, 1).End(xlRight)))
    dx.SizeX = Application.Transpose(Range(r.Offset(1, 1), r.Offset(1, 1).End(xlRight)))
    Product.AddItem dx.CodeX
    'add this reference of an instance of your custom type to
    'to the DataXCollection collection for future use
    'use the product code as the key
    DataXCollection.Add dx, dx.CodeX ' dx.CodeX -key)
    Set r = r.Offset(2)
    Loop

    Product.Text = "Product input"
    End Sub[/vba] When i click on a button to start program:
    Run-time error '1004':
    Application-defined or object-defined error
    With [vba]Private Sub CommandButton1_Click()
    OrderForm.Show
    End Sub[/vba] OrderForm.Show yellow marked ???

    What OrderForm.Show has to do with it ???
    Last edited by SMC; 03-01-2007 at 06:46 AM.

Posting Permissions

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