| Menuへ | ||||
| 超シンプルなはがき印刷ソフトを作ってみよう | ||||
Step 7 宛先の横棒を縦棒に変更する |
||||
| シートコード | ||||
| 下記のコードに変更してください 'データのセット Private Sub ExPrintDataSet(drow As Long) Dim i As Integer Dim n As Integer Dim dat As String Dim s As String '宛先郵便番号 n = 1 dat = ActiveSheet.Cells(drow, 3) For i = 1 To 8 s = Mid(dat, i, 1) If s <> "-" And s <> "−" Then Sheets("はがき表").Shapes("〒" & n).TextFrame.Characters.Text = s n = n + 1 End If Next '住所1、住所2 dat = ActiveSheet.Cells(drow, 4) s = ActiveSheet.Cells(drow, 5) If s <> "" Then dat = dat & vbCrLf & s End If dat = Replace(dat, "-", "│") dat = Replace(dat, "−", "│") Sheets("はがき表").Shapes("宛先住所").TextFrame.Characters.Text = dat '名前 dat = ActiveSheet.Cells(drow, 6) & " " & ActiveSheet.Cells(drow, 7) Sheets("はがき表").Shapes("宛先名前").TextFrame.Characters.Text = dat End Sub |
||||
| 実行結果 | ||||
|
||||
| Topへ |
||||
| ■このサイトの内容を利用して発生した、いかなる問題にも一切の責任は負いませんのでご了承下さい。■ 当ホームページに掲載されているあらゆる内容の無許可転載・転用を禁止します。 Copyright (c) 2006 excel_ninpou All rights reserved. |