View Single Post
 
Old 03-12-2022, 07:36 AM
Scaffold Scaffold is offline Windows 10 Office 2016
Advanced Beginner
 
Join Date: Oct 2009
Location: Moscow, Russia
Posts: 36
Scaffold is on a distinguished road
Unhappy Using textframe value in comparison

Hello everyone!
I need a macro that would do something with a textframe if it contains a specific text.
I try using the following code for comparison:
Code:
Dim value As String
value = shp.TextFrame.TextRange.Text
Dim res As Integer
res = StrComp(value, "testvalue", 1)
The problem is that StrComp function does not consider my values as equal even if they are 100% equal. In other words, it never returns 0.
What am I doing wrong? How can I make it work?
Reply With Quote