Click here to Skip to main content
15,887,214 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
can u help me..
i cant go to the nextblock which is the connction to the nextblock..
i want to make a code from the design flowchart..i shows the step by step process. from it i want to generate code from it ...

im new in vb..help pls.. its my school project. i cant graduate if i dont get this :( pls pls pls

here is the code i use.

Dim I&, FlowPoss&
   Dim wIsolator() As String
   Dim CLine&
   Static ProgMode As Byte
   Dim block As cBlock
   Dim flow As Block_Collection
       For I = 1 To 30
       txt.TextboxLine(I) = ""
   Next

    For I =  1 To flow.Count - 1 'error "block variable not set" 'wat this is means?
       txt.TextboxLine(I) = " "
       FlowPoss = I
       If flow(I).sCaption = "Start" Then
           FlowPoss = I
           Exit For
        End If
    Next
    txt.TextboxLine(1) = "Sub Main()" & vbCrLf
    CLine = 1
      On Error Resume Next
      Do
         CLine = CLine + 1 ->'error "block variable not set" wat  'this is means?
        ' theBlockCollection
         If getNextBlock(block, "Stop") = "Stop" Then Exit Do
     
   Select Case getNextBlock(block, " ")
            Case "Output": txt.TextboxLine(CLine) = "   MsgBox " ' & FlowShape1(GetNextControl(FlowPoss)).Caption & vbCrLf
   End Select
    'FlowPoss = GetNextControl(FlowPoss)
    Loop
      txt.TextboxLine(CLine) = "End Sub"


pls guys i need it so badly ..i want to pass my project..so i can graduate.
Posted
Updated 19-Jan-10 5:03am
v3

"block variable not set" means that you have declared an object but not instantiated it. For instance this line:
Dim flow As Block_Collection

Should be followed by:
Set flow = New Block_Collection


or whatever factory method or static variable you have available from the API where Block_Collection is defined.

before you use the variable flow.
 
Share this answer
 
v2
dim block as block_collection
is class module ...

block_collection is to create new object..

dont know what is rong ..

i just want to generate a code form the shape is been connected..
can i post the .zip that i down load..

im modifying this program ...
 
Share this answer
 
Just to add, your school is teaching you skills with no value in the real world. VB.NET is free, easier to learn, and is currently supported and used in real world projects. You should discuss this with your teacher. VB6 is rubbish, and has been unsupported for almost a decade.
 
Share this answer
 
damn our school so old..
vb8 on out lab3 soooooo slow..
have lots of error ,not proprtly install..

our instructor teach vb6..damn there old.
old school.
no one teach vb8 our school but yet they have vb8 on lab3..

so my chance is vb6.
vb6 where teach by us last sem.
im on 4thyr level now.

1st yr to 2nd yr was java but on the 3rd yr was gone.
no instructor knows java.and even make .jar on in it.
3rd yr we use access but the codding was vb..damn dnt knw how to code.
:mad:

so hope this project works and someone can help me..
pls pls pls :-D
 
Share this answer
 
you can do googling on VB6 ebook[^]
 
Share this answer
 
VB
Private Sub code_Click()
Dim I&, FlowPoss&
   Dim wIsolator() As String
   Dim CLine&
   Static ProgMode As Byte
   Dim block As cBlock
     Dim flow As Block_Collection
    
    Set flow = New Block_Collection
    
       For I = 1 To 30
       txt.TextboxLine(I) = ""
   Next
    For I = 1 To flow.Count - 1
       txt.TextboxLine(I) = " "
       FlowPoss = I
       If flow(I).sCaption = "Start" Then
          FlowPoss = I
        Exit For
      End If
    Next
    txt.TextboxLine(0) = "Sub Main()" & vbCrLf
    CLine = 1
      On Error Resume Next
      Do
         CLine = CLine + 1
        ' theBlockCollection
         If getNextBlock(block, "Stop") = "Stop" Then Exit Do
     
   Select Case getNextBlock(block, " ")
            Case "Output": txt.TextboxLine(CLine) = "   MsgBox " ' & FlowShape1(GetNextControl(FlowPoss)).Caption & vbCrLf
   End Select
    'FlowPoss = GetNextControl(FlowPoss)
    Loop
      txt.TextboxLine(CLine) = "End Sub"
end sub

..
thats the code im working on..
i cant get on the next block..
and even start shape and shape never put on the working area
still its going to get the main sub and the end sub and put it
in the code display...
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900