Problem with Find Code

charllie

Well-known Member
Joined
Apr 6, 2005
Messages
986
Hi Folks,

I have tried to adapt this code below to do the follow but cant seem to get it to work.

What i want it to do is to match the text in Me.IFPI.Box with the same text in column A of Sheets("Current Codes").

Then once it has located the row i want it to then replace the information in the colums with the infor from the textboxes (as indicated below).

However the code doesn't seem to be working. I would really appreciate it if someone could tell me where i am going wrong please?



Code:
   With Sheets("Current Codes")       '<- change here
        Set r = .Columns("a").Find(Me.IFPIBox.Text)
        If Not r Is Nothing Then
            With .Cells(r.Row, Columns.Count)
                .Offset(, 1).Value = Me.IFPIBox.Text
                .Offset(, 2).Value = Me.PressBox.Text
                .Offset(, 3).Value = Me.LayerBox.Text
                .Offset(, 4).Value = Me.LocationBox.Text
                .Offset(, 5).Value = Me.DateTextBox.Text
                .Offset(, 6).Value = Format(Date, "dd mmmm yyyy")
            End With
        End If
    End With
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.

Forum statistics

Threads
1,214,541
Messages
6,120,110
Members
448,945
Latest member
Vmanchoppy

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top