However, when I compile the code, I get a Compile error: Can't find project or library with the Trim function highlighted. What am I missing here please?
Maybe the Trim is an ambiguity of the name, try to use Fully Qualified Name:
If Len(Trim(rngEach.text)) > 0 Then
⇒
If Len(VBA.Trim(rngEach.text))
…
Top comments (0)