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

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).

Forum statistics

Threads
1,214,872
Messages
6,122,025
Members
449,060
Latest member
LinusJE

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