Current location - Trademark Inquiry Complete Network - Futures platform - How to do fuzzy search+pinyin search for VBA Combobox control?
How to do fuzzy search+pinyin search for VBA Combobox control?
Private Worksheet _SelectionChange(ByVal Target as Range)

Continue to the next step when an error occurs.

Dim strN as a string

set CNN = CreateObject(" adodb . connection ")

cnn。 open " Provider = Microsoft . jet . oledb . 4.0; Data source = z: \ KD \ kddata \ "&; Loose sheet 3. [D2]& amp; "database. mdb "

Sql = "Select different customer names from billing data"

StrN = "Select a different customer name from the billing data"

If IsNull(strN), then

MsgBox "Database may be empty"

other

arr = cnn。 Execute (sql). GetRows

Loose sheet 3. ComboBox 1。 List = worksheet function. transposition

If (the target. Column = 2 or target. Column = 3) and target. Then Row = 2

If it is a date (target), then

Calendar 1. Value = goal

other

Calendar 1. today

If ... it will be over.

Calendar 1. Visible = - 1

Calendar 1. Top = ActiveCell。 Top + ActiveCell。 height

Calendar 1. Left = ActiveCell. left

other

Calendar 1. Visible = 0

If ... it will be over.

If ... it will be over.

If Sheet3. Cell (2,3) < & gt ""or Sheet3. Cell (2,3) < & gt ""So

Loose sheet 3. ComboBox 1。 Value = ""

If ... it will be over.

You're fine.