#contents

*Excel 関連情報
**サンプルコード
***ユーザー定義関数のサンプル
 Option Explicit
 
 Sub Main()
     Dim strData As String
     Dim strConverted As String
     strData = "あ1いうえお"
     strConverted = Convert(strData)
     Debug.Print strConverted
 End Sub
 
 Function Convert(ByVal strSrc As String) As String
     Dim strResult As String
     Dim c As String
     Dim i As Integer
     For i = 1 To Len(strSrc)
         c = Mid(strSrc, i, 1)
         ' StrConv() で文字変換を行う。vbNarrow の場合は半角変換
         strResult = strResult & StrConv(c, vbNarrow) & " "
     Next
     Convert = strResult
 End Function

-はてな
--http://www.hatena.ne.jp/1089980844

#comment


トップ   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS