Question:

store option button control from VBA in array or collection

by Guest8353  |  12 years, 9 month(s) ago

0 LIKES UnLike

store option button control from VBA in array or collection

 Tags: array, button, collection, control, option, Store, VBA

   Report

1 ANSWERS

  1. amomipais82
    Hi,
    put the names back in the right order according to the index of the command buttons:

    command1(0) caption would be Knots
    command1(1) caption would be Rope

    But if the are saved in the database as Rope first then command1(0) caption comes in as Rope.

    I do bring the index number back in with the get statement but I can't figure out how to get it to place the name according to the index.

    Below is my code so far.


    Code:
    Private Sub Form_Load()
    Text1.Text = Inet1.OpenURL("http://www.xxxxxxx.com/xxxxxx/api3.php?action=getcat&idKey=1")
    Dim sMaster As String
    Dim sSeg() As String
    Dim sSubSeg() As String
    Dim i As Integer

    sMaster = Text1.Text
    ' First split
    sSeg = Split(sMaster, "::")

    ' Sub split
    For i = 0 To UBound(sSeg)
    sSubSeg = Split(sSeg(i), ":")
    Text3 = sSubSeg(0)
    command1(i).Visible = (sSubSeg(1) <> "")

    'I need somthing else right here to tell it to place the caption according to the index number
    command1(i).Caption = sSubSeg(1)
    Hope it helps

Sign In or Sign Up now to answser this question!

Question Stats

Latest activity: 14 years, 7 month(s) ago.
This question has 1 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.
Unanswered Questions