Select specific cell depending on Textbox1 & motorcycle make value

ipbr21054

Well-known Member
Joined
Nov 16, 2010
Messages
5,737
Office Version
  1. 2007
Platform
  1. Windows
I have a form where the user enters values with various text/combo boxes.
These values are then sent to worksheet.
Textbox1 is the customers name.

The code in Red selects cell I for the customer just added to worksheet.
Where it is currently placed select the cell for everybody.
The cell in question is for the date.

Im wanting to change it so it only works for SUZUKI YAMAHA & KAWASAKI
You will see the code above is shown should one of the makes be used but im stuck with using that code with it.
Basically if SUZUKI YAMAHA or KAWASAKI was used then select the cell I anything else just leave it.

The code supplied is the last part of a working code.
VBA Code:
  End If
 
    If Me.ComboBox3.Value = "SUZUKI" Then
       MsgBox "DONT FORGET TO ADD YEAR", vbInformation, "MOTORCYCLE YEAR MESSAGE"
      
    ElseIf Me.ComboBox3.Value = "YAMAHA" Then
       MsgBox "DONT FORGET TO ADD YEAR", vbInformation, "MOTORCYCLE YEAR MESSAGE"
      
    ElseIf Me.ComboBox3.Value = "KAWASAKI" Then
       MsgBox "DONT FORGET TO ADD YEAR", vbInformation, "MOTORCYCLE YEAR MESSAGE"
      
    End If

    [COLOR=rgb(184, 49, 47)]Range("A:A").Find(TextBox1.Value, , xlValues, xlWhole).Offset(, 8).Select[/COLOR]
End Sub
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
try:
VBA Code:
Sub test()
    Select Case combobox3.Value
        Case "SUZUKI", "YAMAHA", "KAWASAKI"
            MsgBox "DONT FORGET TO ADD YEAR", vbInformation, "MOTORCYCLE YEAR MESSAGE"
            Range("A:A").Find(TextBox1.Value, , xlValues, xlWhole).Offset(, 8).Select
    End Select
End Sub
 
Upvote 0
Solution
Am i using that in replace of the code i supplied in post before ?
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,244
Members
452,622
Latest member
Laura_PinksBTHFT

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