Hi,
I have a multipage form. In page1 there are 5 checkboxes. Each checkboxes are dynamically created with the reference to excel row.
In my excel file, there is a data with column heading and row heading. I selected row heading as checkbox in my form and this checkboxes are dynamically created with the following code :
Const Vis_Strt As Integer = 5
Const Vis_End As Integer = 9
Dim Vis_Top As Integer
Dim iRow As Integer
For iRow = Vis_Strt To Vis_End
If wks.Cells(iRow, col_num) <> "-" Then
Set ctlCheckBox = Me.MultiPage1.Pages(0).Controls.Add("Forms.Checkbox.1")
With ctlCheckBox
.Caption = Cells(iRow, "A")
.Name = "cb" & iRow
.Left = FORM_LEFT
.Top = Vis_Top
.Width = iWidth
End With
Vis_Top = Vis_Top + iPITCH
End If
Next iRow
In my excel file. Each row heading have a value associated with it. The value of checkboxes will change as per the column heading.I want to assign this value to the checkboxes and in the end I want to add only the CHECKED checkbox value.
For better understanding I have attached the excel file. You can also see the vb form that I already created.
Please help me out in this.
Thanks.
Bookmarks