Dim MxR As Long, MxC As Integer, IMax As Long, BfMx As Long
Dim SrcDt As Variant, SrcRn As Variant, Rn As Long, Cn As LongDim MxDt As Long, RCpo As Integer, BMax As Integer, BCut As Integer, TMP1()
Dim MST As Worksheet, IDX As Worksheet
Dim MstS As String, IdxS As String
Sub Src_Dat_ER2()
'
' Src_Dat Macro
' マクロ記録日 : 2008/10/8 ユーザー名 :寺田屋の龍馬
'
' RDBシートより目的のマスタデータを一件検索
' Eco_RDB【エコ・RDB】 Ver.2.0
ST$ = Time$
MstS = "Sheet3": IdxS = "Sheet2"
Set MST = Worksheets(MstS) Set IDX = Worksheets(IdxS)
MxDt = IDX.Cells(2, 201): BfMx = MxDt
IMax = IDX.Cells(3, 201)
RCpo = IDX.Cells(4, 201)
Cl = IDX.Cells(5, 201)
BMax = IDX.Cells(3, 202)
BCut = IDX.Cells(4, 202)
TMP1() = IDX.Range(IDX.Cells(RCpo + 1, 1), IDX.Cells(RCpo + 4001, 1))
SrcDt = MST.Cells(1, 1) '検索する対象のデータを変数にセット
SrcRn = 2010000 'ダミーのレコード番号を変数にセット
'RDBシートよりマスタデータを検索
Call Src_Dt_RD2
(IDX, IDX, SrcDt, SrcRn, Rn, Cn, RCpo, BMax, BCut, TMP1())
MST.Cells(1, 2) = SrcDt
MST.Cells(2, 1) = Rn
MST.Cells(2, 2) = Cn
If Rn > 0 And Cn > 0 Then
MsgBox "検索終了! " + Chr$(13) + Chr$(13) + "開始 : " + ST$ + Chr$(13) + Chr$(13) + "終了 : " + Time$ + Chr$(13) + Chr$(13) + "該当有り! "
Else
MsgBox "検索終了! " + Chr$(13) + Chr$(13) + "開始 : " + ST$ + Chr$(13) + Chr$(13) + "終了 : " + Time$ + Chr$(13) + Chr$(13) + "該当無し! "
End If
End Sub