Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This is the code im using. The part from Founcell.Copy does not seem to be
working. Can anyone help? Private Sub CommandButton1_Click() Dim wks As Worksheet Dim FoundCell As Range Set wks = Worksheets("Sheet1") If Me.TextBox1.Value = "" Then Beep MsgBox "Please enter HRI" Exit Sub End If With wks With .Range("A:A") Set FoundCell = .Cells.Find(what:=Me.TextBox1.Value, _ after:=.Cells(.Cells.Count), _ LookIn:=xlFormulas, _ Lookat:=xlWhole, _ searchorder:=xlByRows, _ searchdirection:=xlNext, _ MatchCase:=False) FoundCell.Copy Sheets("Sheet2").Select Range("A2").Select ActiveSheet.Paste UserForm1.Hide Sheets("Sheet2").Select End With End With If FoundCell Is Nothing Then UserForm1.Hide UserForm2.Show Else MsgBox "Found HRI: " & FoundCell.Value End If End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Find Cut and paste | Excel Discussion (Misc queries) | |||
Find and Paste | Excel Programming | |||
find and paste | Excel Programming | |||
I need to find a macro to find data cut and paste to another colu. | Excel Programming | |||
Paste value of Find | Excel Programming |