Select specific cell depending on Textbox1 & motorcycle make value

ipbr21054

Well-known Member
Joined
Nov 16, 2010
Messages
5,602
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

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
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,221,310
Messages
6,159,176
Members
451,543
Latest member
cesymcox

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