Lesson 1 1 EXVBA2000 Lesson01 Lesson01.xls 2



Similar documents
D0050.PDF

コンピュータ概論

D0120.PDF

ii

Microsoft PowerPoint - Visualプログラミング

PowerPoint プレゼンテーション

1. 入力画面

PowerPoint プレゼンテーション

コンピュータ概論

untitled

AccessVBA−‹ŠpŁÒ-flO“Z

D0020.PDF

D0090.PDF


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

Case 0 sqlcmdi.parameters("?tencode").value = Iidata(0) sqlcmdi.parameters("?tenname").value = Iidata(1) 内容を追加します sqlcmdi.executenonquery() Case Else

PowerPoint プレゼンテーション

.NETプログラマー早期育成ドリル ~VB編 付録 文法早見表~

csv csv


ファイル操作-インターネットキャッシュ

Excel Excel Excel = Excel ( ) 1

Microsoft PowerPoint - vp演習課題

With sqlda sqlda に SelectCommand を追加.SelectCommand = New MySqlCommand() With.SelectCommand.CommandType = CommandType.Text.CommandText = "select * from

第10回 コーディングと統合(WWW用).PDF

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

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

PowerPoint プレゼンテーション

<4D F736F F D208DEC90AC837D836A B81698F4390B394C5816A2E646F63>

データを TreeView コントロールで表示 VisualStudio2017 の Web サイトプロジェクトで bootstrap, 及び script フォルダの js ファイルが使用できるマスターページを親とする TestTreeView.aspx ページを作成します 下記の html コー

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

橡実践Oracle Objects for OLE

sinfI2005_VBA.doc

My関数の作成演習問題集

バスケットボール

untitled

Microsoft Word - VBA基礎(3).docx


1. 入力画面

Microsoft Word - 課題1_2.doc

Microsoft Word - ŁtŸ^‡S

MS-ExcelVBA 基礎 (Visual Basic for Application)

情報基礎A

の包絡線を求めることになる 包絡線は一次式で表せるのでこのときの係数 ( 切片 ) を求 めればよいことになる この係数 ( 切片 ) が粘着力となる 包絡線はモールの応力円に外 接する直線であるため 包絡線の式は下記三式を解くことにより求めることができる 包絡線の式 Y=A1 X + B1 ---

Excel ダッシュボードのご紹介 株式会社アイエルアイ総合研究所内藤慶一

USB汎用インターフェース・キット ガイドブック


ブロック パニック

橡vb_kikai0.PDF

PowerPoint プレゼンテーション

(J言語研究会 2007年2月14日)

Microsoft Word 練習問題の解答.doc

LogisticaTRUCKServer-Ⅱ距離計算サーバ/Active-Xコントロール/クライアント 概略   

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

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

Excel Excel Excel = Excel III 7 ( ) 1

BASICとVisual Basic

08‘͆i”O“Z†j

CommandMatrix_8230E

DAOの利用

untitled

LogisticaTRUCKServer-Ⅱ距離計算サーバ/Active-Xコントロール/クライアント 概略   

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

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

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

<リスト1> AD コンバータへのデータの出力例 NEC PC98 用 mov al,22h // CLK -> 1, CS -> 0, DI -> 0 out 32h,al // シリアル ポートにデータ出力 PC/AT 互換機用 mov al,00h // CLK -> 1 mov dx,3fb

VBM01#解答解説# indd

2 1 F M m r G F = GMm r 2 (1.1) (1.1) (r = r ) F = GMmr r 3 (1.2) a F m F = kma k 1 F = ma (1.3) (1.2) (1.3) ma = GMmr r 3 (1.4)


情報資源組織演習B:

D1印刷用.PDF

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

Oracle Lite Tutorial

ようこそゲストさんトップ最新の日記ユーザー登録ログインヘルプ CX's VBScript Diary <Visual Studio は VBScript 用の最強エデ VBScript 基礎文法最速マスター 11:50 VBScript の文法一覧です 他の言語をある程度

技術ノート KGTN

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

KARACRIX

PR300 電力モニタ 通信インタフェース (RS-485通信,Ethernet通信)

ドッグファイト

ランボール


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

untitled

PowerPoint プレゼンテーション

プロセス間通信

本サンプル問題の著作権は日本商工会議所に帰属します また 本サンプル問題の無断転載 無断営利利用を厳禁します 本サンプル問題の内容や解答等に関するお問 い合わせは 受け付けておりませんので ご了承ください 日商プログラミング検定 STANDARD(VBA) サンプル問題 知識科目 第 1 問 ( 知

アプリケーション

VB 資料 電脳梁山泊烏賊塾 音声認識 System.Speech の利用 System.Speech に依るディクテーション ( 音声を文字列化 ).NetFramework3.0 以上 (Visual Studio 2010 以降 ) では 標準で System.Speech が用意されて居るの


チア ダンス

承 認

PowerPoint Presentation

9399-TOOLSGRJA

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

方程式の解法

正規表現応用

サービス付き高齢者向け住宅賠償責任保険.indd

Oracle Lite Tutorial

3軸加速度センサーモジュール MM-2860 書込み済みマイコンプログラム通信コマンド概要

AJAN IO制御コマンド コマンドリファレンス

Transcription:

Excel2000VBA L e a r n i n g S c h o o l 1

Lesson 1 1 EXVBA2000 Lesson01 Lesson01.xls 2

3 Module1:(General)- Public Sub () Dim WS As Object Dim DiffDate As Integer Dim MaxRows As Integer, CopyRows As Integer Dim StartRow As Integer Dim i As Integer Set WS = Worksheets(1) WS.Range("B1") = Date CopyRows = GetRows(2) + 1 If CopyRows = 0 Then MsgBox " " Exit Sub End If StartRow = 3 Do If WS.Cells(StartRow, 1) = "" Then MsgBox " " Exit Sub End If DiffDate = WS.Cells(StartRow, 1) - WS.Range("B1") 3

If DiffDate < 0 Then With WS.Range(Cells(StartRow, 1), _ Cells(StartRow, 3)).Copy Destination:=Worksheets(2). _ Cells(CopyRows, 1).Delete End With CopyRows = CopyRows + 1 End If Loop While DiffDate < 0 MaxRows = GetRows(1) If MaxRows = -1 Then MsgBox " " Exit Sub End If For StartRow = 3 To MaxRows DiffDate = WS.Cells(StartRow, 1) - WS.Range("B1") Select Case DiffDate Case 3 With WS.Cells(StartRow, 3).Value = " " & DiffDate & " ".Interior.ColorIndex = 4 End With Case 2 With WS.Cells(StartRow, 3).Value = " " & DiffDate & " ".Interior.ColorIndex = 6 End With Case 1 With WS.Cells(StartRow, 3).Value = " ".Interior.ColorIndex = 7.Font.ColorIndex = 2 End With Case 0 With WS.Cells(StartRow, 3).Value = " " For i = 0 To 200.Interior.ColorIndex = 3 4

End Sub.Interior.ColorIndex = 1.Font.ColorIndex = 2 Next.Interior.ColorIndex = 3 End With Case Is >= 4 WS.Cells(StartRow, 3).Clear End Select Next 3 Module1:(General)-GetRows Public Function GetRows(ByVal SheetNo As Integer) As Long Dim i As Long Dim Result i = 2 On Error GoTo FAIL Set WS = Worksheets(SheetNo) Do i = i + 1 Result = WS.Cells(i, 1) Loop While Result <> "" GetRows = i - 1 Exit Function FAIL: '-1 GetRows = -1 End Function 5

1 6

2 7

3 Dim WS As Object Dim DiffDate As Integer Dim MaxRows As Integer, CopyRows As Integer Dim StartRow As Integer Dim i As Integer 4 8

Set WS = Worksheets(1) WS.Range("B1") = Date?date 00/01/17 9

5 CopyRows = GetRows(2) + 1 If CopyRows = 0 Then MsgBox " " Exit Sub End If 6 StartRow = 3 Do If WS.Cells(StartRow, 1) = "" Then MsgBox " " Exit Sub End If 10

DiffDate = WS.Cells(StartRow, 1) - WS.Range("B1") 7 If DiffDate < 0 Then With WS.Range(Cells(StartRow, 1), _ Cells(StartRow, 3)).Copy Destination:=Worksheets(2). _ Cells(CopyRows, 1) 11

8.Delete CopyRows = CopyRows + 1 Loop While DiffDate < 0 12

9 MaxRows = GetRows(1) If MaxRows = -1 Then MsgBox " " Exit Sub End If For StartRow = 3 To MaxRows DiffDate = WS.Cells(StartRow, 1) - WS.Range("B1") Select Case DiffDate Case 3 With WS.Cells(StartRow, 3).Value = " " & DiffDate & " ".Interior.ColorIndex = 4 End With 13

Case 2 With WS.Cells(StartRow, 3).Value = " " & DiffDate & " ".Interior.ColorIndex = 6 End With Case 1 With WS.Cells(StartRow, 3).Value = " ".Interior.ColorIndex = 7.Font.ColorIndex = 2 End With Case 0 With WS.Cells(StartRow, 3).Value = " " For i = 0 To 200.Interior.ColorIndex = 3.Interior.ColorIndex = 1.Font.ColorIndex = 2 Next.Interior.ColorIndex = 3 End With Case Is >= 4 WS.Cells(StartRow, 3).Clear 14

10 15

Public Function FuncName(ByVal Var As Integer) As Long End Function Public Function Public Private Function Function Sub FuncName Function ByVal Var As Integer ByVal ByRef As Long Function End Function Function End Function 11 Public Function GetRows(ByVal SheetNo As Integer) As Long Dim i As Long Dim Result i = 2 16

On Error GoTo FAIL Set WS = Worksheets(SheetNo) Do i = i + 1 Result = WS.Cells(i, 1) Loop While Result <> "" 12 GetRows = i - 1 Exit Function 17

FAIL: MsgBox Error(Err.Number) End Function MaxRows = GetRows(1) For StartRow = 3 To MaxRows FAIL: GetRows = -1 End Function 13 18

Q1 19