If certain text is in a cell . . .
In , Dallman Ross <dman@localhost.
spake thusly:
This seems to work fine now. Basicaly, run web queries on
pages if certain conditions are met. First, the right part
of the sheet name should appear in A1 of the first sheet on
which queries get run. Second, run one of the othe sheets
regardless. Third, run the "Pending" sheet only if outside
market hours.
I found a bug. I fixed it and changed a couple of other
minor things. Here's the bug, in case anybody's "listening."
ElseIf sh.Name = "* Pending" Then
Needed to be
ElseIf sh.Name Like "* Pending" Then
The main other thing I changed is adding an OR-statement:
If InStr(5, pNumStr, Right(sh.Name, 2)) 0 _
Or sh.Name = "Order Status - New" Then
Became
If InStr(5, pNumStr, Right(sh.Name, 2)) 0 _
Or sh.Name = "Order Status - New" _
Or Not IsEmpty(Range("A4")) Then
That's because the sheets that I don't always run
queries on might be out of date with old data. They
are supposed not to run because they are empty.
=dman=
|