Hello
I have a problem when select one of optionbutton on userform .
if I select one of optionbuttons then will select the sheet
Private Sub OptionButton1_Click()
If OptionButton1.Value = True And OptionButton2.Value = False Then sheet5.Select
End Sub
Private Sub OptionButton2_Click()
If OptionButton2.Value = True And OptionButton1.Value = False Then sheet6.Select
End Sub
and should populate data for selected sheet based on this line
Private Sub UserForm_Activate()
With ActiveSheet
a = .Range("A2:G" & .Range("D" & Rows.Count).End(3).Row).Value
End With
End Sub
but seems working for just one sheet ignoring procedure activesheet in UserForm_Activate .
so what I want populating data in listbox based on selected sheet from optionbutton to become activesheet when write the BARND for column D into textbox2 .
thanks