Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I use the following code to search for a value in a
column and then display the field values in text boxes on the form and it works great. Now I need a command to save the changes made to the field values in the text boxes back to those specific fields. Private Sub cmdSearch_Click() Dim rng As Range With Worksheets("Sheet1").Columns(1) Set rng = .Find(what:=frmSearch.TextBox1.Text, _ After:=Range("A65536"), _ LookIn:=xlFormulas, _ LookAt:=xlWhole, _ SearchOrder:=xlByRows, _ SearchDirection:=xlNext, _ MatchCase:=False) End With If Not rng Is Nothing Then With frmSearch .TextBox2.Text = rng.Offset(0, 1).Value .TextBox3.Text = rng.Offset(0, 2).Value ' and so forth End With Else MsgBox frmSearch.TextBox1.Text & _ " was not found" End If End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Save as Command Line | Excel Discussion (Misc queries) | |||
Excel save command | Excel Discussion (Misc queries) | |||
Worksheets with OFFSET command always ask if I want to SAVE | Excel Worksheet Functions | |||
Command Button Save As Application.ExecuteExcel4Macro ("SAVE.AS?() | Excel Discussion (Misc queries) | |||
Save As command | Excel Programming |