ipbr21054
Well-known Member
- Joined
- Nov 16, 2010
- Messages
- 5,226
- Office Version
- 2007
- Platform
- Windows
This is the code in use.
I have also supplied a screenshot.
My issue is the bar at the bottom of the screen & it shouldnt be there.
As you can see there is plenty of space to the right of the customers name but column width is 80
Making it more than 80 makes the bar worse.
Making it small than 80 then the bar is gone.
I cant see why i am not able to have the 80 more like 150 without the bar being shown
Do you see something in the code that ived missed.
I have also supplied a screenshot.
My issue is the bar at the bottom of the screen & it shouldnt be there.
As you can see there is plenty of space to the right of the customers name but column width is 80
Making it more than 80 makes the bar worse.
Making it small than 80 then the bar is gone.
I cant see why i am not able to have the 80 more like 150 without the bar being shown
Do you see something in the code that ived missed.
Rich (BB code):
Private Sub TextBoxChassisNumber_Change()
TextBoxChassisNumber = UCase(TextBoxChassisNumber)
Dim R As Range, f As Range, cell As String, added As Boolean
Dim sh As Worksheet
Set sh = Sheets("DATABASE")
sh.Select
With ListBox1
.Clear
.ColumnCount = 8
.ColumnWidths = "170;110;50;80"
If TextBoxChassisNumber.Value = "" Then Exit Sub
Set R = Range("L6", Range("L" & Rows.Count).End(xlUp))
Set f = R.Find(TextBoxChassisNumber.Value, LookIn:=xlValues, LookAt:=xlPart)
If Not f Is Nothing Then
cell = f.Address
Do
added = False
For i = 0 To .ListCount - 1
Select Case StrComp(.List(i), f.Value, vbTextCompare)
Case 0, 1
.AddItem f.Value, i
.List(i, 1) = f.Offset(, -10).Value
.List(i, 2) = f.Row
.List(i, 3) = f.Offset(, -11).Value
added = True
Exit For
End Select
Next
If added = False Then
.AddItem f.Value
.List(.ListCount - 1, 1) = f.Offset(, -10).Value
.List(.ListCount - 1, 2) = f.Row
.List(.ListCount - 1, 3) = f.Offset(, -11).Value
End If
Set f = R.FindNext(f)
Loop While Not f Is Nothing And f.Address <> cell
TextBoxSearch = UCase(TextBoxSearch)
.TopIndex = 0
Else
MsgBox "NO CUSTOMER WAS FOUND USING THAT INFORMATION", vbCritical, "POSTAGE SHEET CUSTOMER NAME SEARCH"
TextBoxChassisNumber.Value = ""
TextBoxChassisNumber.SetFocus
End If
End With
End Sub