Hi,
I am stuck with this trying to make this work and any help is appreciated. This code works:
Private Sub OKButton_Click_Click_1()
If OptionMe Then
If OptionOne Then
If OptionOneFile Then
Call Import_One_File
End If
If OptionAllFiles Then
Call Import_One_Folder
End If
End If
If OptionTwo Then
If OptionOneFile Then
Call Import_Two_Files
End If
If OptionAllFiles Then
Call Import_Two_Folders
End If
End If
If OptionThree Then
If OptionOneFile Then
Call Import_Three_Files
End If
If OptionAllFiles Then
Call Import_Three_Folders
End If
End If
End If
End Sub
but uses a lot of IF statements and the actual code uses a long list of IF statements. So I am trying to simplify things by using Select Case but can't seem to pass the decisions of the three buttons correctly to the macro.
Here is my Select Case example:
Private Sub OKButton_Click_Click_2()
' Couldn't figure out what to put after Select Case so I used "<<>>" as a placemarker
Select Case "<<>>"
Case OptionMe And OptionOne And OptionOneFile
Call Import_One_File
Case OptionMe And OptionOne And OptionAllFiles
Call Import_One_Folder
Case OptionMe And OptionTwo And OptionOneFile
Call Import_Two_Files
Case OptionMe And OptionTwo And OptionAllFiles
Call Import_Two_Folders
Case OptionMe And OptionThree And OptionOneFile
Call Import_Three_Files
Case OptionMe And OptionThree And OptionAllFiles
Call Import_Three_Folders
End Select
End Sub
Any thoughts?
abousetta
Bookmarks