ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] ¦p¦ó­pºâ¤£¥]¬A¼ÐÂI²Å¸¹ªº¦r¼Æ¡H

§Q¥ÎVBA¬O¥i¥Hªº¡C

TOP

¡°µ{¦¡¤]±Æ°£³o¨Ç¦r¤¸¡G" ¡@" & vbCr & vbLf & vbCrLf & vbTab & vbBack

Option Explicit
Option Base 1

Sub ­pºâ¤£¥]¬A¼ÐÂI²Å¸¹¦r¼Æ()

    Dim X As Long
    Dim N As Long
   
    N = 0
    For X = 1 To Selection.Characters.Count
        If F_¼ÐÂI²Å¸¹§P©w_01(Selection.Characters(X)) = False And InStr(" ¡@" & vbCr & vbLf & vbCrLf & vbTab & vbBack, Selection.Characters(X)) = 0 Then
            N = N + 1
        End If
    Next X
   
    MsgBox "¤£¥]¬A¼ÐÂI²Å¸¹¦r¼Æ¡G" & N

End Sub

Public Function F_¼ÐÂI²Å¸¹§P©w_01(ByVal ¨Ó·½¦r¤¸ As String) As Boolean
   
    On Error Resume Next
   
    Dim ¼ÐÂI²Å¸¹¦r¦ê As String
   
    ¼ÐÂI²Å¸¹¦r¦ê = "!""#$%&()*+,-./:;<=>?@[\]^_`{|}~¡I" & StrConv("""", vbWide) & "¡­¢C¢H¡®¡]¡^¡¯¡Ï¡A¡Ð¡D¡þ¡G¡F¡Õ¡×¡Ö¡H¢I¡e¢@¡f¡s¡Ä¡¥¡a¡U¡b¡ã"
   
    If InStr(1, ¼ÐÂI²Å¸¹¦r¦ê, ¨Ó·½¦r¤¸, vbBinaryCompare) = 0 Then
        F_¼ÐÂI²Å¸¹§P©w_01 = False
    Else
        F_¼ÐÂI²Å¸¹§P©w_01 = True
    End If

End Function

TOP

¼ÐÂI²Å¸¹¦r¦ê = "!""#$%&()*+,-./:;<=>?@[\]^_`{|}~¡I" & StrConv("""", vbWide) & "¡­¢C¢H¡®¡]¡^¡¯¡Ï¡A¡Ð¡D¡þ¡G¡F¡Õ¡×¡Ö¡H¢I¡e¢@¡f¡s¡Ä¡¥¡a¡U¡b¡ã"

³o¦r¦ê¥i¥H¦Û¤v¼W¥[¡A¼ÐÂI²Å¸¹«Ü¦h¡I

TOP

        ÀR«ä¦Û¦b : ¡i»X½ªªº¦Û¥Ñ¡j¤H±`¦b¤°»ò³£¥i¥H¦Û¥Ñ¦Û¦bªº®É­Ô¡A«o³Q³oºØÀH¤ß©Ò±ýªº¦Û¥Ñ»X½ª¡AµêÂY®É¥ú¦Ó²@µLıª¾¡C
ªð¦^¦Cªí ¤W¤@¥DÃD