borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB Home | News Home | Forum Home | Downloads | Register | Search | PM | Profile

Previous Topic (check service pack and hotfix are installed)Next Topic (How to get min and max values from a flatfile) New Topic Post Reply
AndreaVB OnLine : VB General : Does anyone know how to create a survey with numbers?
Poster Resource
FrankJunior
Level: Graduate

Registered: 20-02-2006
Posts: 9
icon Does anyone know how to create a survey with numbers?

i need help with the numbers  

____________________________
Being happy is something you have to learn. I often surprise myself by saying "Wow, this is it. I guess I'm happy. I got a home I love. A career that I love. I'm
even feeling more and more at peace with myself." If there's something else to happiness, let me know. I'm ambitious for that,
too.

____________________________
:
ScreenHunter_12.jpg 35 KB (: 4)

11-05-2006 at 03:26 AM
View Profile Send Email to User Show All Posts | Add Comment
FrankJunior
Level: Graduate

Registered: 20-02-2006
Posts: 9
icon Re: Does anyone know how to create a survey with numbers?

anybody  There ?

____________________________
Being happy is something you have to learn. I often surprise myself by saying "Wow, this is it. I guess I'm happy. I got a home I love. A career that I love. I'm
even feeling more and more at peace with myself." If there's something else to happiness, let me know. I'm ambitious for that,
too.

15-05-2006 at 11:21 AM
View Profile Send Email to User Show All Posts | Add Comment
JLRodgers
Level: Moderator

Registered: 04-04-2002
Posts: 1617
icon Re: Does anyone know how to create a survey with numbers?

This isn't the answer, but is just to give you an idea (i.e. modifications or using it as a template could give you the answer).

Based on the picture, it has to allow for multiple users, not just one -- I wouldn't do it like this normally.


Option Explicit

Private Sub Form_Load()
    Const ALWAYS = 0
    Const USUALLY = 1
    Const SOMETIMES = 2
    Const SELDOM = 3
    Const NEVER = 4
    
    Dim i As Integer
    Dim i2 As Integer
    Dim sTmp As String
    
    Dim TotalsChart()
    ReDim TotalsChart(1, NEVER)
    
'    TotalsChart(USER, ANSWER) = Question_Numbers
'ex:
    
' First User
    TotalsChart(0, ALWAYS) = "1,4,2,10"
    TotalsChart(0, USUALLY) = "5"
    TotalsChart(0, SOMETIMES) = "3, 9"
    TotalsChart(0, SELDOM) = "6, 8"
    TotalsChart(0, NEVER) = "7"
    
' Second User
    TotalsChart(1, ALWAYS) = "3, 5, 7"
    TotalsChart(1, USUALLY) = "4"
    TotalsChart(1, SOMETIMES) = "2, 10"
    TotalsChart(1, SELDOM) = "1, 8"
    TotalsChart(1, NEVER) = "6, 9"
    
    
' Totals
' ALWAYS
    For i = 0 To UBound(TotalsChart())
        sTmp = "User " & i & vbCrLf
        For i2 = ALWAYS To NEVER
            TotalsChart(i, i2) = ItemCount(TotalsChart(i, i2))
                        
            sTmp = sTmp & vbTab & "Aswer " & i2 & ": " & TotalsChart(i, i2) & vbCrLf
        Next
        Debug.Print sTmp
    Next
End Sub


Function ItemCount(ByVal Value As String) As Integer
    Dim tmp() As String
    
    tmp = Split(Value, ",")
    
    ItemCount = UBound(tmp) + 1
End Function


____________________________
Everywhere's Local (classifieds, job postings, & more for everycity in the world - user entered)

15-05-2006 at 01:56 PM
View Profile Send Email to User Show All Posts Visit Homepage | Add Comment
GeoffS
Level: VB Lord


Registered: 29-09-2004
Posts: 536
icon Re: Does anyone know how to create a survey with numbers?

(beaten to it - must learn to type a bit quicker)

[Edited by GeoffS on 15-05-2006 at 01:59 PM GMT]

____________________________
multi-tasking - the ability to hang more than one app. at the same time.

15-05-2006 at 01:57 PM
View Profile Send Email to User Show All Posts | Add Comment
AndreaVB OnLine : VB General : Does anyone know how to create a survey with numbers?
Previous Topic (check service pack and hotfix are installed)Next Topic (How to get min and max values from a flatfile)New Topic Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder