| 
    
     |  | どなたか御教授下さい。 
 下記記述で、ユーザーフォームから検索。
 該当データをユーザーフォーム上に呼び出しています。
 ここから、呼び出したデータを修正。元のセルに更新保存を行いたいのですが、可能でしょうか?
 
 Private Sub CommandButton2_Click()
 Dim SearchKey As String
 Dim SearchArea As Range
 Dim FoundCell As Range
 Dim ws As Worksheet, fndflg As Boolean
 '検索語入力
 SearchKey = Application.InputBox( _
 Prompt:="LotNo,を入力して下さい。", Type:=2)
 If SearchKey = "" Or SearchKey = "False" Then
 Exit Sub
 End If
 '検索処理
 '検索範囲
 fndflg = False
 For Each ws In Worksheets
 If ws.Name Like "*P*" Then
 Set SearchArea = ws.Range(ws.Range("d5"), ws.Range("d5").End(xlDown))
 Set FoundCell = SearchArea.Find( _
 What:=SearchKey, _
 SearchOrder:=xlByRows, _
 MatchCase:=False)
 '見つかった場合の処理
 If Not FoundCell Is Nothing Then
 
 fndflg = True
 Exit For
 End If
 End If
 Next
 If fndflg = True Then
 MsgBox FoundCell.Address
 UserForm1.TextBox3.Value = FoundCell.Value
 UserForm1.TextBox1.Value = FoundCell.Offset(0, -3).Value
 UserForm1.TextBox2.Value = FoundCell.Offset(0, -2).Value
 UserForm1.TextBox4.Value = FoundCell.Offset(0, 1).Value
 UserForm1.TextBox5.Value = FoundCell.Offset(0, 4).Value
 UserForm1.ComboBox2.Value = ws.Name
 Else
 MsgBox "該当は存在しません。", vbCritical
 End If
 Set SearchArea = Nothing
 Set FoundCell = Nothing
 
 End Sub
 
 説明が不十分かと思いますが、宜しく御願い致します。
 尚、このマクロは教えて頂いたもので、当方で少し変更を加えたものです。
 マクロに付いては、ほぼ初心者ですので、御理解と御教授の程、宜しく御願い致します。
 
 |  |