Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 07-03-2024, 04:00 AM
vivka vivka is offline VBA include Character Code 002D Dash-Minus Windows 7 64bit VBA include Character Code 002D Dash-Minus Office 2016
Expert
 
Join Date: Jul 2023
Posts: 293
vivka is on a distinguished road
Default

Hi! Your dash 2013 is actually en-dash ChrW(8211) & dash 002D is hyphen-minus ChrW(45).
Without seeing your 'Select Case ...' I have doubts if the following will help, but try using
Code:
Case InStr(oRngEval, " " & ChrW(8211) & " ") = 1, InStr(oRngEval, " " & ChrW(45) & " ") = 1

Or if there are no other Cases, I'd use:
Code:
Dim sStr As String

Select Case InStr(oRng, " " & sStr & " ") = 1
Case sStr = ChrW(45), sStr = ChrW(8211)
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA include Character Code 002D Dash-Minus List of ascii code of Character Symbols or code for all symbols used in Word SamDsouza Word VBA 3 03-12-2020 04:49 AM
VBA include Character Code 002D Dash-Minus How can you use the " character for inches in a field code? steveflooks Word 1 07-19-2018 02:52 PM
VBA include Character Code 002D Dash-Minus Help to include header and footer in string search code which i already have. branko Word VBA 1 03-28-2017 11:50 PM
Is it possible to include a newline character in the replace text desgordon Word 2 09-14-2012 02:28 AM
VBA include Character Code 002D Dash-Minus Need Word to change -- (dash,dash) into one long dash. Bobosmite Word 2 05-06-2011 04:21 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:26 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