・シート
Dim c As Range
Dim rn As String
Set c = Sheets("取引先住所マスタ").Range("A:A").Find(What:=UserForm2.TextBox3, LookIn:=xlValues, LookAT:=xlWhole)
rn = Sheets("取引先住所マスタ").Range("A:A").Find(c).Row
・フォーム
Dim myTarget As Range
Dim myFind As Range
Set myFind = wb_B_TMJ.Range("A:A")
Set myTarget = myFind.Find(UserForm6.TextBox1.Text, LookAT:=xlWhole)
myTarget.Activate
Dim R As Long
R = ActiveCell.Row
・別ブック
Dim a As String
Set wb_B = Workbooks("取引先マスタ.xlsm")
Set wb_B_TMJ = wb_B.Worksheets("取引先住所マスタ")
Set wb_B_TMK = wb_B.Worksheets("取引先口座マスタ")
i = wb_B_TMJ.Range("A1").End(xlDown).Row
a = UserForm4.TextBox2.Value
Dim mycell As Range
Set mycell = wb_B_TMJ.Range("C2:C" & i).Find(What:=a, LookAT:=xlWhole)
If Not mycell Is Nothing Then
MsgBox "社名が存在しています。ご確認ください。"
Else
'MsgBox "未登録番号です。登録しました。"
住所登録3
End If