Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 03-12-2022, 07:36 AM
Scaffold Scaffold is offline Using textframe value in comparison Windows 10 Using textframe value in comparison Office 2016
Advanced Beginner
Using textframe value in comparison
 
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
 

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Document Comparison Thefirstfish` Word VBA 0 04-10-2017 01:07 PM
Comparison (with styles) Macro aarona Word VBA 0 03-03-2017 11:18 PM
Saving & reopening comparison MarshallAbrams Word 0 03-29-2012 06:19 AM
Comparison jumps to end MarshallAbrams Word 2 03-21-2012 04:04 AM
Using textframe value in comparison oshp.TextFrame.TextRange.Font <The specified error is out of range> ghumdinger PowerPoint 5 12-09-2011 10:36 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:09 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft