Results 1 to 2 of 2

Thread: Object variable or With block variable not set???

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 1999
    Posts
    77

    Unhappy Object variable or With block variable not set???

    Maybe I still need to learn more with VB before using MDI, but what does, "Object variable or With block variable not set", mean? Here's my code if you want to see it:
    (does it mean the type of both variables' type not set? that doesn't make sense...)
    ---------------------------
    Public Sub NewScript(FileN As String, DefNumber As Integer)
    Dim Document() As frmChild, I As Long
    ReDim Document(glo.DocNumber) As frmChild

    I = glo.DocNumber

    'Error occured below this line
    Document(I).Caption = "CharDef " & DefNumber & " - " & FileN
    'Error occured above this line

    Document(I).rtbScript.LoadFile (FileN)

    glo.DocNumber = glo.DocNumber + 1
    Document(I).Show
    End Sub
    ---------------------------
    ...and if you are wondering, the glo.[variable] is a public type I setup in a module.
    (am I giving enough information?)

    Anyone please help me. Thanks =)

  2. #2
    Addicted Member Screamager's Avatar
    Join Date
    May 2001
    Location
    Dublin, Ireland
    Posts
    174
    Document is an object and needs to be set?

    set Document(l)=new frmChild
    Computer /nm./: a device designed to speed and automate errors

Posting Permissions

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



Click Here to Expand Forum to Full Width