Search for numeric digit string

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 13117
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Search for numeric digit string

Post by ChrisGreaves »

I hoped to avoid posting a new topic by searching the Lounge to see if my topic had been discussed, but here i am with a new new topic before I can get around to posting my new topic.

Run-Time Errors (RTE) in VBA are common in inexperienced programmers, and yes, i got one.
The specific error is

Code: Select all

Run-time error '91':
Object variable or With block variable not set
20220507_02.png
I tried Advanced searching for the specific error using (in this case) the two-digit RTE code.
I tried various versions, two digits with a wildcard, the leading single-quote and so on.

I know that I could search for the text "Object variable or With block variable not set" that happens to be available in my specific case (because I can read the VBA message), but in general, how can I search for a two-digit string, as one might search (in phpBB) for "Spirit of '76" or "class of '63" and so on?
Thanks, Chris
You do not have the required permissions to view the files attached to this post.
Don’t let a good crisis go to waste

User avatar
HansV
Administrator
Posts: 73832
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Search for numeric digit string

Post by HansV »

The minimum length of a word in search is 2 characters. Indexing two-character words would make the index too large and slow.
Try searching Google for

"runtime error 91" site:eileenslounge.com
Regards,
Hans

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 13117
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Re: Search for numeric digit string

Post by ChrisGreaves »

HansV wrote:
07 May 2022, 12:26
The minimum length of a word in search is 2 characters. Indexing two-character words would make the index too large and slow.
Untitled.png
Thanks Hans. If I understand it then, a search for three characters, one of which is the wildcard <asterisk>, fails because the base string of the two digits "nine" and "one" is only - well - two characters in length, even though I submit a three-character string?
Untitled2.png
And in the example above, the rejection will be on account of the search string being only numeric digits?
Thanks, Chris
You do not have the required permissions to view the files attached to this post.
Don’t let a good crisis go to waste

User avatar
StuartR
Administrator
Posts: 11823
Joined: 16 Jan 2010, 15:49
Location: London, Europe

Re: Search for numeric digit string

Post by StuartR »

The search does not look in every article, it looks in a presorted index that links to the articles. This index does not have any two letter words in it, so you can't search for them.
StuartR


User avatar
ChrisGreaves
PlutoniumLounger
Posts: 13117
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Re: Search for numeric digit string

Post by ChrisGreaves »

StuartR wrote:
08 May 2022, 08:05
The search does not look in every article, it looks in a presorted index that links to the articles. This index does not have any two letter words in it, so you can't search for them.
Thank you, Stuart.
I see.
So we are never searching the Forums as much as searching a function "f" of the forums, hence Index:=f(Forums).
A corollary then is that if Admin decide to increase the limit from two to twenty-two, then we are doomed to rarely have a satisfied Search - whether it be advanced or simple.

If I am on track so far, I can see why a search for my two-digit string "91" must fail.
The searches, below, all fail with the warning message

Code: Select all

91*
91'
'91
'91'
"'91'"
which, since we are searching the index, suggests that the program code that builds the index is stripping out asterisks, and single- and double quotes as a matter of course.
This leads me to the corollary's corollary that the wild-card character must be useless when used with two-character search-strings, be they digits or alphanumeric in general.

An advanced search for gr* fails ("too common"), but an advanced search for gre* finds 12,781 matches.

I suppose that I should be glad that my parents didn't name me H*Y*M*A*N K*A*P*L*A*N :grin:

Cheers, Chris
Don’t let a good crisis go to waste

User avatar
HansV
Administrator
Posts: 73832
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Search for numeric digit string

Post by HansV »

Or Elon Musk's first child X Æ A-12
Regards,
Hans

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 13117
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Re: Search for numeric digit string

Post by ChrisGreaves »

HansV wrote:
08 May 2022, 16:47
Or Elon Musk's first child X Æ A-12
Not as shameful as being told that Greaves, as a name, is too common :igiveup:
Cheers, Chris
Don’t let a good crisis go to waste

User avatar
StuartR
Administrator
Posts: 11823
Joined: 16 Jan 2010, 15:49
Location: London, Europe

Re: Search for numeric digit string

Post by StuartR »

ChrisGreaves wrote:
08 May 2022, 16:33
A corollary then is that if Admin decide to increase the limit from two to twenty-two, then we are doomed to rarely have a satisfied Search - whether it be advanced or simple.
The forum software would allow us to change this down to as little as single characters, but the performance would be awful. The current limits are a minimum of 3 characters and a maximum of 14
StuartR


User avatar
ChrisGreaves
PlutoniumLounger
Posts: 13117
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Re: Search for numeric digit string

Post by ChrisGreaves »

StuartR wrote:
08 May 2022, 21:24
The forum software would allow us to change this down to as little as single characters, but the performance would be awful. The current limits are a minimum of 3 characters and a maximum of 14
Well, OK, but I am still left with the function that builds the index.
if that program code strips off quote, quotes, and asterisk, then I can never locate 91 in the index, not even as a three-character string 91* or *91.
Cheers, Chris
Don’t let a good crisis go to waste