サイトマップ
dz02572i@yahoo.co.jp
最新記事
ランキング



カウンタ


検索

サイト内のVBAコードを検索できます。


Google
WWW を検索 VBA を検索

 [2008/10/05]  Update / by dz02572i


No.[43] 全角を半角に変換する / StrConv




[ -- ページの移動 -- ]

[前]・半角を全角に変換する / StrConv

[次]・コンボボックスに1,10,20・・・100の値を入れる



≪前のページ| HOME | 次のページ≫


・カテゴリ別に表示する / ジャンル別


トップページ





 ■■■■■■■■ 記 事 No.[43] Entry Start ■■■■■■■■

<--- 一覧へ戻る




[文字列の変換  StrConv / 全角 -->半角 ]

081005.png

今回は全角を半角に変換するマクロです。





Private Sub CommandButton1_Click()

'========================
'vbNarrow 全角--->半角
'========================


Dim myStr As String
myStr = TextBox1.Text

TextBox2.Text = StrConv(myStr, vbNarrow)



End Sub

























[U] 文字列操作 | 【2008-10-05(Sun) 09:56:56】 | Trackback(-) | Comments(-)
編集  

 
Ads by Google




[Key]
vbCrLf Chr(10) Chr(13) Application.WorksheetFunction.Max End(xlUp) ActiveCell.Row - 1 Cells(11,"B").Select Worksheet_SelectionChange UserForm Application.Wait Now() Application.Speech.Speak CreateObject("SAPI.SpVoice") voice.getdescription() Do While  TimeValue< Len vbNarrow Replace trim Until  Exit Do Like Right UBound Split vbLf ActiveSheet.Hyperlinks.Add Anchor Range GetVoices.Count voice.getdescription Item ColumnCount ColumnWidths  ColumnCount ColumnWidths Cells(10, "IV").End(xlToLeft).Column .PageSetup.PrintArea Label ComboBox CheckBox OptionButton ListBox vlookup NumberFormatLocal  Application.GoTo Reference:=Range("$B$4"), Scroll:=True ActiveSheet.ScrollArea = "A1:D65536"  Cells(1, "A").NumberFormatLocal = "yy/mm/dd" Selection.Delete Shift:=xlUp IsError Application.VLookup DoEvents Loop CriteriaRange AdvancedFilter Action:=xlFilterInPlace .SaveAs , xlCSVActiveSheet.Hyperlinks.Add Anchor:=Selection, Address< Dir(ThisWorkbook.Path & "\*") Set myRng = myData.Find(myWord, LookAt:=xlPart) Application.WorksheetFunction.Match InStr Left Mid Trim Replace StrConv vbNarrow ComboBox1.AddItem ListBox1.AddItem Like 'ActiveCell.Interior.ColorIndex = 37 Rows(ActiveCell.Row).Interior.ColorIndex = xlNone Selection.ClearContents Selection.Clear Range(Cells(myRow1, "A"), Cells(myRow2, "C")).ClearContents ActiveSheet.PageSetup.PrintArea = "$A$2:$C$10"