L
Legacy 15162
Guest
I am using worksheet names as criteria for a sql query. there are worksheets that are used as rollups....how would i leave out those rollup worksheet names since they would not reside in the access table...here is the beginning portion of the code currently in place.
For i = 1 To xlWB.Worksheets.Count
Set xlWS = xlWB.Worksheets(i)
stWkshtName = xlWS.Name
' Sequel String to pull back selected fields
stSqlAct = "Select [Actual].*" & _
" From [Actual]" & _
" Where [Actual].[Store] =" & stWkshtName
For i = 1 To xlWB.Worksheets.Count
Set xlWS = xlWB.Worksheets(i)
stWkshtName = xlWS.Name
' Sequel String to pull back selected fields
stSqlAct = "Select [Actual].*" & _
" From [Actual]" & _
" Where [Actual].[Store] =" & stWkshtName