Find Chinese characters in text using VB
VB Find Chinese Characters in Text
Private Sub Command1_Click()
Dim AR() As String, AR2() As String
sTxt = "2 01 01 00 00 00 00 00 00 00 F4 44 0C 00 08 01 29 01 03 00 00 00 00 00 00 00 F4 44 0C 00 08 01 D3 01 04 00 00 00 00 00 00 00 F4 44 0C 00 08 01 2A 01 06 00 00 00 00 00 00 00 F4 44 0C 00 08 01"
AR = Split(sTxt, "D3 01")
L = LBound(AR) 1
U = UBound(AR)
For i = L To U
tmp = Trim(AR(i))
AR2 = Split(tmp, " ")
'Output
Me.Print AR2(LBound(AR2)) & Space(2);
Next i
End Sub
VB Find Text
First question: There needs to be one button and two textboxes
Private Sub Command1_Click()
Dim a As Integer
a = InStr(1, Text1.Text, Text2.Text, vbTextCompare)
Text1.SetFocus
Text1.SelStart = a - 1
Text1.SelLength = Len(Text2.Text)
End Sub
Second question:
Private Sub Command1_Click()
Dim a As Integer
a = InStr(1, Text1.Text, Text2.Text, vbTextCompare)
If a > 0 Then
Text1.SetFocus
Text1.SelStart = a - 1
SendKeys "{down}"
End If
End Sub
Do your own research as needed, hehe
VB text search problem
3 text boxes, 1 button
text1 is the text, text2 displays the results, text3 needs to find the text
Private Sub Command1_Click()
Dim p As Long, s As Long
Dim L As String
p = -1
Do While True
s = p 2
p = InStr(s 1, Text1.Text, vbCrLf)
If p = 0 Then
Text1.SelStart = s - 1
Text1.SelLength = Len(Text1.Text) - s 1
Else
Text1.SelStart = s - 1
Text1.SelLength = p - s 1
End If
If InStr(1, Text1.SelText, Text3.Text) > 0 Then
If Text2.Text = "" Then
Text2.Text = Text1.SelText
Else
Text2.Text = Text2.Text & vbCrLf & Text1.SelText
End If
End If
If p = 0 Then Exit Do
Loop
End Sub
The above is the detailed content of Find Chinese characters in text using VB. For more information, please follow other related articles on the PHP Chinese website!

This comprehensive guide explains how to effectively manage your Outlook email storage by archiving emails, tasks, and other items across various Outlook versions (365, 2021, 2019, 2016, 2013, and earlier). Learn to configure automatic archiving, pe

The tutorial shows how to compare text strings in Excel for case-insensitive and exact match. You will learn a number of formulas to compare two cells by their values, string length, or the number of occurrences of a specific character, a

This comprehensive guide ensures your Outlook data remains safe and accessible. Learn how to back up Outlook emails, contacts, calendar entries, and tasks—both automatically and manually—across all Outlook 365 and 2010 versions. The importance of re

This tutorial shows you quick and easy ways to remove extra spaces in Excel. Learn how to eliminate leading, trailing, and excess spaces between words, troubleshoot the TRIM function, and discover alternative solutions. Facing duplicate detection fa

This tutorial shows you how to eliminate unwanted spaces in Excel using formulas and the handy Text Toolkit. Learn to remove leading and trailing spaces, extra spaces between words, non-breaking spaces, and other non-printing characters. The biggest

Excel remains popular in the business world, thanks to its familiar interfaces, data tools and a wide range of feature sets. Open source alternatives such as LibreOffice Calc and Gnumeric are compatible with Excel files. OnlyOffice and Grist provide cloud-based spreadsheet editors with collaboration capabilities. Looking for open source alternatives to Microsoft Excel depends on what you want to achieve: Are you tracking your monthly grocery list, or are you looking for tools that can support your business processes? Here are some spreadsheet editors for a variety of use cases. Excel remains a giant in the business world Microsoft Ex

This tutorial explains how to use MATCH function in Excel with formula examples. It also shows how to improve your lookup formulas by a making dynamic formula with VLOOKUP and MATCH. In Microsoft Excel, there are many different lookup/ref

This tutorial demonstrates how to effectively use multiple IF functions in Microsoft Excel, showcasing nested IF formulas for various tasks. The core concept is using nested IF statements to evaluate multiple conditions and return different results


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

WebStorm Mac version
Useful JavaScript development tools

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

Dreamweaver Mac version
Visual web development tools

Zend Studio 13.0.1
Powerful PHP integrated development environment

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.