Jump to content

Vb Help


intel_inside

Recommended Posts

In my VB class at school our teacher wants us to make a jeopardy game for a project. She wants the command buttons for each category to be made out of a control array...but every time a make a question for a command button every button in that array has the same question...is there any way i can do somthing different with each button ? any help would be appreciated

Share this post


Link to post
Share on other sites

I think I know the problem, when you create a control array, you have a standard sub like this.

 

Private Sub Command(Index as integer)

 

end sub

 

For command(1) Index will = 1

 

so you just need to use something like this

 

if Index = 1 then command(index).caption = "Question1"

 

or you could store the questions in an array like, questions(), and use something like

 

while index < counter

command(index).caption = questions(index)

index = index + 1

wend

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...