S
StephanieH
I have the following Form set up to help others access specific files. Is
there a way to make Option Button 2 the default should user not make a
selection?
Private Sub OK_Click()
If OptionButton1 Then
For i = 0 To ListBox1.ListCount - 1
If ListBox1.Selected(i) Then
Workbooks.Open
Filename:="\\Fl-msjf-fs1\Data\Data\RECOVERY\EXLDATA\Loan Recovery
MIS\Budget\2004" & ListBox1.List(i) & "P&L.xls"
End If
Next i
Unload UserForm9
Range("A1").Select
End If
If OptionButton2 Then
For i = 0 To ListBox1.ListCount - 1
If ListBox1.Selected(i) Then
Workbooks.Open
Filename:="\\Fl-msjf-fs1\Data\Data\RECOVERY\EXLDATA\Loan Recovery
MIS\Budget\2005" & ListBox1.List(i) & "P&L.xls"
End If
Next i
Unload UserForm9
Range("A1").Select
End If
End Sub
there a way to make Option Button 2 the default should user not make a
selection?
Private Sub OK_Click()
If OptionButton1 Then
For i = 0 To ListBox1.ListCount - 1
If ListBox1.Selected(i) Then
Workbooks.Open
Filename:="\\Fl-msjf-fs1\Data\Data\RECOVERY\EXLDATA\Loan Recovery
MIS\Budget\2004" & ListBox1.List(i) & "P&L.xls"
End If
Next i
Unload UserForm9
Range("A1").Select
End If
If OptionButton2 Then
For i = 0 To ListBox1.ListCount - 1
If ListBox1.Selected(i) Then
Workbooks.Open
Filename:="\\Fl-msjf-fs1\Data\Data\RECOVERY\EXLDATA\Loan Recovery
MIS\Budget\2005" & ListBox1.List(i) & "P&L.xls"
End If
Next i
Unload UserForm9
Range("A1").Select
End If
End Sub