Hey Guys, thanks for the replies. This is not the only coding I have for the xla. The xla itself adds a new option in the menu bar of excel (File, Edit, etc.). If you choose one of the listed options (there are about 9 options - some with forms and all they all seem to be tempermental), I do not receive an error message but excel shuts down completely! ( I created an xla for a pc similar to this but never had this issue!). Would "bad" vba in a different module affect this module? As for the SQL_WHERE, that just formats values in column A with single quotes and a comma so that they can be used in my sql statement (ex: 'xxxx', 'xxxx', etc.). I have posted the code below. Again, if you need more info just let me know! Thanks so much for the help!

[vba]Public Function SQL_WHERE(ByRef ViewRange As Excel.Range, _
Optional ByRef StringIdentifier As String = "'", _
Optional ByRef DateIdentifier As String = "'") As String


Dim r As Excel.Range, i As Integer
ReDim a_values(0) As Variant 'To store the values of the non_empty cells in the range
Dim sBuffer As String 'To store the text of the "in clause"
Dim bAllNumeric As Boolean
Dim sTypeChar As String

bAllNumeric = True

For Each r In ViewRange
If r.Value <> "" Then 'ignore blanks
ReDim Preserve a_values(UBound(a_values) + 1)
a_values(UBound(a_values)) = r.Value
If Not IsNumeric(r.Value) Then bAllNumeric = False
End If
Next

For i = 1 To UBound(a_values)
Select Case True
Case IsNumeric(a_values(i)): sTypeChar = ""
Case IsDate(a_values(i)): sTypeChar = DateIdentifier
Case Else: sTypeChar = StringIdentifier
End Select
sBuffer = sBuffer & sTypeChar & a_values(i) & sTypeChar
If Not i = UBound(a_values) Then sBuffer = sBuffer & ", "
Next i

SQL_WHERE = " IN (" & sBuffer & ")"

Erase a_values

End Function[/vba]