08‘͆i”O“Z†j

Similar documents
My関数の作成演習問題集

untitled

Excel Excel Excel = Excel ( ) 1

コンピュータ概論

SEO対策サービスパッケージ

B 5 (2) VBA R / B 5 ( ) / 34

45 VBA Fortran, Pascal, C Windows OS Excel VBA Visual Basic Excel VBA VBA Visual Basic For Application Microsoft Office Office Excel VBA VBA Excel Acc

94 expression True False expression FalseMSDN IsNumber WorksheetFunctionIsNumberexpression expression True Office support.office.com/ja-jp/ S

PowerPoint プレゼンテーション

2 X Y Y X θ 1,θ 2,... Y = f (X,θ 1,θ 2,...) θ k III 8 ( ) 1 / 39


PowerPoint プレゼンテーション

Excel Excel Excel = Excel III 7 ( ) 1

Excel ではじめる数値解析 サンプルページ この本の定価 判型などは, 以下の URL からご覧いただけます. このサンプルページの内容は, 初版 1 刷発行時のものです.

D0090.PDF

情報科学概論 第1回資料

D0050.PDF

2X Y Y X θ 1, θ 2,... Y = f(x, θ 1, θ 2,...) θ k III 8 ( ) 1 / 39

D0020.PDF

saihata.doc

Microsoft PowerPoint - vp演習課題

PSCHG000.PS

PowerPoint プレゼンテーション

untitled

VBAfiüŒåŁÒver2

ExcelVBA Excel VBA Microsoft Excel VBA Visual Basic for Applications Excel Excel VBA ExcelVBA Excel ExcelVBA Excel VBA Excel ExcelVBA ExcelVBA VBA Ran

コンピュータ概論

untitled

1. 入力画面

untitled

EXCEL VBA講座

再利用して保存する場合は 新規登録 ボタン 1000 件まで登録できます 読み込んだ見積もりデータを 請求書に送るときは 請求へ複写 ボタン 2 請求書の作成 請求書 ボタンを押し 必要な項目を入力し 印刷 新規登録 ボタン data 読込 ボタンで作成済みデータを読みこめます 登録修正番号の数値の

最初に VBA が使用できるように マクロ と呼ばれるエクセル上のアプリ ( のようなもの ) を準備します Excel メニューの ファイル オプション を選択 表示される Excel のオプション から リボンのユーザー設定 を選択 メインタブ 内の 開発 にチェックを付けて OK をクリック

ii

PowerPoint プレゼンテーション

OS Windows Mac OS Windows Mac OS Windows XP Mac OS X OS Windows 95 Mac OS

Lesson 1 1 EXVBA2000 Lesson01 Lesson01.xls 2

卒業論文.PDF

BASICとVisual Basic

PowerPoint プレゼンテーション

D0120.PDF

情報資源組織演習B:

Excelfl—‘ãŁª’Í-flO“Z

Microsoft Word _VBAProg1.docx

単語の比較とスペルチェック COMPARA Word のテキスト内にある単語を抽出し 異なり語のリストを作成するプログラムです また Word のテキスト内の単語 ( または単語リスト ) を 先に作成した単語リストと照合して その異同を確かめます フォーム 単語リスト単語集計同語検索異語検索同語リ

CommandMatrix_8230E

PSCHG000.PS

1. 入力画面

ExcelVBA

[Excelが自動化するVBAの魔法2]購入者限定テキスト

48 * *2

<4D F736F F D208DEC90AC837D836A B81698F4390B394C5816A2E646F63>

(18,26) 10/ GHz.xls [ (18GHz) ] GHz.xls [ (26GHz) ] +----all.sh [ 2 10 ] +----mesure-ryudai/ / _csv.log [

PowerPoint プレゼンテーション

&

untitled

PowerPoint プレゼンテーション

DF-200

動的串刺し計算のコツ

情報基礎A

Koblitz Miller field Fp p prime field Fp E Fp Fp Hasse Weil 2.2 Fp 2 P Q R R P Q O P O R Q Q O R P P xp, yp Q xq, yq yp yq R=O


sinfI2005_VBA.doc


Word VBA基本&活用テクニック Part 1

橡vb_kikai0.PDF

教科書原稿

untitled

合併後の交付税について

よくわかる Microsoft Excel 2019/2016/2013 マクロ/VBA(FPT1910)

PowerPoint プレゼンテーション

1 (1) vs. (2) (2) (a)(c) (a) (b) (c) 31 2 (a) (b) (c) LENCHAR

AccessVBA−‹ŠpŁÒ-flO“Z

Microsoft Word - VBA基礎(6).docx

Microsoft Word - VBA基礎(3).docx

Microsoft Word - ExcelVBA.doc

Excel 2007 Excel 2007 "Excel " " " " Excel 2003 Excel 2007 " "" Excel Web ""

承 認

Microsoft PowerPoint - slide

Microsoft PowerPoint - Visualプログラミング

2013 年 8 月 14 日 管理図作成マニュアル ( 案 ) 益永八尋 Ⅰ. プログラムの概要 品質管理において必要な QC7 道具の一つである管理図作成のプログラムを作成した このプログラムは 下記の管理図を作成するものである 1 BerX-R 管理図 2Me 管理図 3X 管理図 4np 管

Module1 には 損 益 入 力 シートのデータに 関 連 するマクロが 格 納 されている( 表 1) 以 下 に Module1 を 構 成 するマクロを 掲 載 する 表 1 Module1 の 構 成 Module 設 置 されたシート 名 登 録 されたマクロ 作 業 内 容 データの

橡WINAPLI.PDF

Microsoft PowerPoint - VBA解説1.ppt [互換モード]

ケミカルエンジニアのためのExcelを用いた化学工学計算法

( 2 / 35

MS-ExcelVBA 基礎 (Visual Basic for Application)


N88 BASIC 0.3 C: My Documents 0.6: 0.3: (R) (G) : enterreturn : (F) BA- SIC.bas 0.8: (V) 0.9: 0.5:

(Microsoft Word \203v\203\215\203O\203\211\203~\203\223\203O)

untitled

PowerPoint プレゼンテーション

6.1 工 程 管 理 (ネットワーク 工 程 表 ) 159 VBA( 実 行 結 果 例 ) 出 力 結 果 シート 出 力 結 果 を 図 に 描 くと 下 図 のようになる. 図 6.3 ネットワーク 工 程 表 ( 出 力 結 果 より 作 図 )

エクセル マクロ 言 語 とは エクセルのマクロとは 手 番 をあらかじめ 記 述 しておくことにより 通 常 手 操 作 している 処 理 を 自 動 化 すること 自 動 化 したものです マクロで 手 番 を 記 録 すれば 繰 り 返 し 作 業 を 自 動 化 できます また 連 続 的


VBM01#解答解説# indd

csv csv

商学論叢 第55巻 第1号

年計グラフ作成システム

Oracle Lite Tutorial

Transcription:

1 2 3 4 5 6 7 9 10 11

1 7 1 126 Microsoft Excel VBA Microsoft Excel VBA 127

Sub () ' ' []A2 A3A19 ' B19C19 ' ' []ABC ' DE ' ' ' [] ' ' [] ' ' Dim KaisyaName As String ' Dim TantouName As String ' Dim ShouhinName As String ' Dim Tanka As Long ' Dim ChumonSuu As Integer ' Dim IchiranGyo As Long Dim SeikyuGyo As Integer Dim InsatsuYN As Integer For IchiranGyo = 2 To 65536 ' [] ' [] ' ' [] Sheets("").Select A' [] ' Range("A" & IchiranGyo).Select ' KaisyaName KaisyaName = Selection.Value Range("B" & IchiranGyo).Select TantouName = Selection.Value Range("C" & IchiranGyo).Select ShouhinName = Selection.Value Range("D" & IchiranGyo).Select Tanka = Selection.Value Range("E" & IchiranGyo).Select ChumonSuu = Selection.Value ' TantouName ' ShouhinName ' Tanka ' ChumonSuu 1 2 3 4 5 ' [][] Sheets("").Select Range("A2").Select ' [] ' A2 If Selection.Value <> KaisyaName Then ' ' A2 ' ' [] ' InsatsuYN = MsgBox("?", vbyesnocancel) If InsatsuYN = vbcancel Then Exit For If InsatsuYN = vbyes Then ActiveWindow.SelectedSheets.PrintOut Copies=1B ' Range("A19C42").Select C Selection.ClearContents ' 19 SeikyuGyo = 19 Range("A2").Select A Selection.Value = KaisyaName 'A2 Range("A3").Select 'A3 Selection.Value = TantouName & " " Range("A" & SeikyuGyo).Select 'ASeikyuGyo Selection.Value = ShouhinName Range("B" & SeikyuGyo).Select 'BSeikyuGyo Selection.Value = Tanka Range("C" & SeikyuGyo).Select 'CSeikyuGyo Selection.Value = ChumonSuu SeikyuGyo = SeikyuGyo + 1 Next IchiranGyo MsgBox "!" End End Sub '()!0 7 23 9!1 If KaisyaName = "" Then Exit For ' ' 6 1 12 Microsoft Excel VBA Microsoft Excel VBA 129

3 Dim SeikyuGyo1 Dim 2 ForNextIchiranGyo1 For For IchiranGyo2 For265536 If 11 4 Sheets(""). SelectRange("A" & "IchiranGyo").SelectIchiranGyo A = Selection.Value 3 1 5 2 A B DelC 46 130 Microsoft Excel VBA Microsoft Excel VBA 131

2 DimAs 71 Dim KaisyaName As String ' Dim TantouName As String ' Dim ShouhinName As String ' Dim Tanka As Long ' Dim ChumonSuu As Integer ' DimAs DimAs DimAs VBA Dim KaisyaName As StringKaisyaNameString Dim ChumonSuu As Integer Enter Enter 62 Dim u 1 ChumonSuuInteger 1 Dim KaisyaName As String, TantouName As String, ShouhinName As String 132 Microsoft Excel VBA Microsoft Excel VBA 133

3 Sheets().SelectSelection.Value Excel2 Sheets()Worksheets()Charts() Sheets() Sheets("").Select Range("A" & IchiranGyo).Select KaisyaName = Selection.Value ' [] ' KaisyaName Sheets().Select Range().SelectA 7A1A2A3 Sheets().Select Sheets().Select Range("A" & IchiranGyo).Select Range() " String 1 A10 Range("A10").Select [A10].Select A10B15 Range("A10B15").Select [A10B15].Select Range("").Select.Select = Selection.Value Selection.Value Range().Select KaishaName Sheets("").Select Range("A" & IchiranGyo).Select KaisyaName = Selection.Value 134 Microsoft Excel VBA Microsoft Excel VBA 135

4 If ThenElse AXBY If TrueFalse If Selection.Value <> KaisyaName Then ' ' Range("A19C42").Select Selection.ClearContents ' 19 SeikyuGyo = 19 Tokuten10050 If Tokuten = 100 Then MsgBox "" If Tokuten <= 50 Then MsgBox "" If ThenElse IfThenIfThen If Then End If Else If Then Else If Tokuten = 100 Then MsgBox "" Else MsgBox "" Tokuten100 6060 If Tokuten < 60 Then MsgBox "" Else MsgBox "" 136 Microsoft Excel VBA Microsoft Excel VBA 137

If If 2If X If Selection.Value <> KaisyaName Then ' ' A2 ' = If X = 100 Then X100 > If X > 100 Then X100 < If X < 100 Then X100 >= If X >= 100 Then X100 <= If X <= 100 Then X100 <> If X <> 100 Then X100 2 ' [] ' InsatsuYN = MsgBox("?", vbyesnocancel) If InsatsuYN = vbcancel Then Exit For If InsatsuYN = vbyes Then ActiveWindow.SelectedSheets.PrintOut Copies=1 ' Range("A19C42").Select Selection.ClearContents If X < 100 Then If 100 > X Then ' 19 SeikyuGyo = 19 NameString If If Name = "" Then If Name <> "" Then 1 2 Name If Selection.Value <> KaisyaName Then ' ' KaisyaName 1If 124 MsgBox "" Range("A19C42").Select Selection.ClearContents SeikyuGyo = 19 (A19C42) 2 SeikyuGyo19 4 1 3 IfA2 KaisyaName KaisyaName A2If A2KaisyaName 13 Microsoft Excel VBA Microsoft Excel VBA 139

5 ForExit For To For IchiranGyo = 2 To 65536 Exit For For Next IchiranGyo Exit For ForNextNextExit For A19C42 SeikyuGyo 19 For IchiranGyo = 2 To 65536 If KaisyaName = "" Then Exit For Next IchiranGyo MsgBox "!" KaisyaName Exit For For 140 Microsoft Excel VBA Microsoft Excel VBA 141

6 MsgBox MsgBox MsgBoxIf InsatsuYN = MsgBox("?",vbYesNoCancel) MsgBox "!" MsgBox MsgBox (,,) MsgBox MsgBox VBA MsgBox vbokonly 0 vbokcancel 1 vbabortretrylgnore 2 vbyesnocancel 3 vbyesno 4 vbretrycancel 5 OK MsgBoxIf MsgBox If Microsoft Excel InsatsuYN = MsgBox("?", vbyesnocancel) '[] If InsatsuYN = vbcancel Then Exit For '[] If InsatsuYN = vbyes Then ActiveWindow.SelectedSheets.PrintOut Copies=1 142 Microsoft Excel VBA Microsoft Excel VBA 143

IfEnd If 1 \ Next 3 IfMsgBox \ 2 InsatsuYNInteger InsatsuYN = MsgBox("?", vbyesnocancel) \ 2 2 A19C42 InsatsuYN 3 vbcancel2vbyes6 vbno7 If 4 19 vbok 1 vbcancel 2 vbabort 3 vbretry 4 vbignore 5 vbyes 6 vbno 7 144 Microsoft Excel VBA Microsoft Excel VBA 145

7 ActiveWindow.SelectedSheets.PrintOut ActiveWindow.SelectedSheets.PrintOut ActiveWindow.SelectedSheets.PrintOut Copies=1 Activewindow.SelectedSheets Copies Copies 1 From From To To PrintOut.PrintOut CopiesFromTo PrintOut ActiveWindow.SelectedSheets.PrintOut Copies=1 With ActiveSheet.PageSetup.LeftHeader = "".CenterHeader = "".RightHeader = "".BlackAndWhite = False.Zoom = 100.PrintErrors = xlprinterrorsdisplayed End With 146 Microsoft Excel VBA Microsoft Excel VBA 147

Selection.ClearContents 9 Selection.Value Selection.Clearcontetns Del Selection.ValueSelection.Value Range("A19C42").Select Selection.ClearContents 'A2KaisyaName Range("A2").Select Selection.Value = KaisyaName Range().SelectSelection.ClearContents Range().SelectSelection.ClearContents Range().Select Selection.ClearContents ClearContents Selection.Clear Worksheets("").Range("A19C42").ClearContents Selection.Value Selection.Value 10050.50 Selection.Value "1,005,050" Selection.Value "2002/11/27" Selection.Value "045030" Selection.Value "Asaka" 14 Microsoft Excel VBA Microsoft Excel VBA 149

10 2 Value 2IchiranGyo SeikyuGyo1IchiranGyoFor 1SeikyuGyo 1 IchiranGyo Range().SelectSelection.Value 'A2KaisyaName Range("A2").Select Selection.Value = KaisyaName 'A3TantouName Range("A3").Select Selection.Value = TantouName & " " 'ASeikyuGyoShouhinName Range("A" & SeikyuGyo).Select Selection.Value = ShouhinName 'BSeikyuGyoTanka Range("B" & SeikyuGyo).Select Selection.Value = Tanka 'CSeikyuGyoChumonSuu Range("C" & SeikyuGyo).Select Selection.Value = ChumonSuu For IchiranGyo = 2 To 65536 Sheets("").Select Range("C" & IchiranGyo).Select ShouhinName = Selection.Value Range("D" & IchiranGyo).Select Tanka = Selection.Value Next IchiranGyo +1 150 Microsoft Excel VBA Microsoft Excel VBA 151

For SeikyuGyo 1SeikyuGyo1SeikyuGyo 1 19 SeikyuGyoSeikyuGyo1 SeikyuGyo11 11 End End Sub () End End Sub End End End End SubEnd Function If Selection.Value <> KaisyaName Then SeikyuGyo = 19 Sheets("").Select Range("A" & SeikyuGyo).Select Selection.Value = ShouhinName SeikyuGyo = SeikyuGyo + 1 +1 9 EndEnd End Visual Basic Editor 53 152 Microsoft Excel VBA Microsoft Excel VBA 153

C Len Len() Right\ c = Right(FolderName, 1) If c <> "\" Then FolderName = FolderName & "\" End if 154 1 InputBox MidFor 1 For i=1 To Len(Moji) c = Mid(Moji, i, 1) Next i Moji1 c LeftRight Left, Right, Left Right 0"" Left c = Left(Moji, 1) If c = "" Then MsgBox "" Microsoft Excel VBA Mid Mid,, 1 11, Len LCaseUCase LCase UCase LCaseUCase Chk1 = UCase(Code) Chk2 = Ucase(DBCode) If Chk1 = Chk2 Then MsgBox ""