Memo/2004-07-16
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
単語検索
|
最終更新
|
ヘルプ
]
開始行:
#contents
*Excel 関連情報 [#x3ffc2d0]
**サンプルコード [#qddcaedc]
***ユーザー定義関数のサンプル [#t043a6b0]
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
終了行:
#contents
*Excel 関連情報 [#x3ffc2d0]
**サンプルコード [#qddcaedc]
***ユーザー定義関数のサンプル [#t043a6b0]
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
ページ名: