MajP
You've got your good things, and you've got mine.
- Local time
- Today, 15:33
- Joined
- May 21, 2018
- Messages
- 9,990
This is in relation to the demo I am doing using VBA extensibility.
Does anyone have code to find a whole word in text? Want to pass in a line of text and search text and return if matched.
I am looking for strings of "code" in code so these are some of the possibilities.
If looking for "form1" it could be sorrounded by (),[],.,!,', or space
Forms!Form1.Controls
Forms("form1")
Forms_Form1
[Form1]
'Form1'
Also the thing I am searching might have these same characters within the string such as if looking for these strings
"Docmd.Openform"
"Forms!Form1"
Thanks. I assume this can be done with regex (not my strength) where whole word can be lead or followed with a non alpha numeric. But not sure how you do not return
Form123.
or Form1
My simple search got rid of all non alphnumeric characters and replaced with space. This worked fine for finding
Form1
but can no longer search for "Debug.print"
I can improve my search by only removing characers not in the search string (95%) solution.
How to find unused object/items?
Doesn't Peter Cole's 32bit to 64bit Conversion program (Access Europe) do something similar? It trawls through the code and locates where changes should be made. Which is similar but not identcal ot this requirement. Is it possible to repeat what Peter is doing, with amendments?
www.access-programmers.co.uk
Does anyone have code to find a whole word in text? Want to pass in a line of text and search text and return if matched.
I am looking for strings of "code" in code so these are some of the possibilities.
If looking for "form1" it could be sorrounded by (),[],.,!,', or space
Forms!Form1.Controls
Forms("form1")
Forms_Form1
[Form1]
'Form1'
Also the thing I am searching might have these same characters within the string such as if looking for these strings
"Docmd.Openform"
"Forms!Form1"
Thanks. I assume this can be done with regex (not my strength) where whole word can be lead or followed with a non alpha numeric. But not sure how you do not return
Form123.
or Form1
My simple search got rid of all non alphnumeric characters and replaced with space. This worked fine for finding
Form1
but can no longer search for "Debug.print"
I can improve my search by only removing characers not in the search string (95%) solution.