Userform question

ipbr21054

Well-known Member
Joined
Nov 16, 2010
Messages
5,738
Office Version
  1. 2007
Platform
  1. Windows
I’m thinking of making a userform for my grass cutting business.

I’m not entirely sure how to approach it yet but something like select a customers name & the relevant info fields are then shown.

One thing I’m stuck with is some customers have repeat visits so maybe by clicking on a fields drop down arrow would then show a list of dates when I’ve visited them, or any other suggestions would be good.

Thanks.
 
Re: Userform question if I may ask please

Try this:
Code:
Private Sub ComboBox1_Change()
'Modified  5/22/2019  4:10:21 PM  EDT
Dim SearchString As String
Dim SearchRange As Range
SearchString = ComboBox1.Value
Dim lastrow As Long
Dim i As Long
Dim r As Long
Dim b As Long
Dim Lastcolumn As Long
lastrow = Cells(Rows.Count, "B").End(xlUp).Row
Set SearchRange = Range("B2:A" & lastrow).Find(SearchString, LookIn:=xlValues, lookat:=xlWhole)
If SearchRange Is Nothing Then MsgBox SearchString & "  Not Found": Exit Sub
For i = 1 To 7
    Controls("TextBox" & i).Value = Cells(SearchRange.Row, i * 2).Value
Next
Me.TextBox6.Value = Format(Me.TextBox6.Value, "?#,##0.00")
Lastcolumn = Cells(SearchRange.Row, Columns.Count).End(xlToLeft).Column
ListBox1.Clear
For b = 20 To Lastcolumn
If IsNumeric(Cells(SearchRange.Row, b).Value) Then
    ListBox1.AddItem Format(Cells(SearchRange.Row, b).Value, "?#,##0.00")
Else
    ListBox1.AddItem Cells(SearchRange.Row, b).Value
End If
Next
End Sub
 
Upvote 0

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Re: Userform question if I may ask please

Hi,
Sorry for a delay in my reply but had a family fatality.

Works like a charm.

Many thanks
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,289
Members
452,631
Latest member
a_potato

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