Hi How can I to use LIKE statment in VB, I do not to referecing with SQL , I want to use LIKE manipulating Strings
Here is the sample usage of Like: VB Code: Dim test As String test = "12-34" If test Like "##-##" Then Debug.Print "Success" Else Debug.Print "Failure" End If
Dim test As String test = "12-34" If test Like "##-##" Then Debug.Print "Success" Else Debug.Print "Failure" End If
CS
MSDN
Take a moment to rate useful posts VB6 CodeBank: Glass Form & Tracing App , MouseWheel with Any Control , Form Previewer Utility VB6 Snippets: RTB: Disable Smooth Scrolling , Form: Left & Right Justified Text in TitleBar , ListBox: As-You-Type Filtering (fast) , MSFlexGrid: Non-Adjacent Col/Row Selection , IsProcessRunning: PSAPI / WMI , PictureBox: Frame Look-A-Like , Open Folder in a Particular View , Form: Always on Bottom VBA Snippet: Generic Mouseover Workaround
If pattern is complex then using Regular Expression would be much more efficient.
Microsoft MVP - Visual Basic 2006-2013 Why VB clears the clipboard on startup and how to avoid it? . Filtering Arrays . Save File To Database . Extract File From Database . Extract picture from database without using hard drive . Change Menu BackColor . How to use MS Flexgrid . Make Frame Transparent . The Easiest Way to Create an NT Service With VB6 . How to comment blocks of code in VB5 and VB6 . How to find and replace missing members of control array Visual Basic 6.0 On-Line Documentation . Connection Strings
Forum Rules