Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now
Private Sub Command5_Click() Dim Success As Boolean Dim Value As String Dim StringEntered As String StringEntered = "yjk65kg12dky" 'this will be textbox value entered by user Value = GetNumbers(StringEntered) If Val(Value) >= 5000 And Val(Value) <= 9900 Then 'now check if the correct letters are typed Success = True Else Success = False End If MsgBox Success End Sub Function GetNumbers(Value As String) As String 'extract and return numbers from a string Dim Index As Long Dim Digit As String Dim Final As String Dim Count As Long Count = 1 GetNumbers = space(Len(Value)) For Index = 1 To Len(Value) Digit = Mid(Value, Index, 1) If Digit Like "[0-9]" Then Mid(GetNumbers, Count, 1) = Digit Count = Count + 1 End If Next GetNumbers = Left(GetNumbers, Count - 1) End Function
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
|VB6 Compile Compatibility Issue||4||131|
|Question about INSTR - need to extract data MS ACCESS query||6||69|
|using web browser with BING||40||153|
|Error when passing an argument to a vb6 that contains '/'||7||49|
Join the community of 500,000 technology professionals and ask your questions.