Home > Software engineering >  Please help to extract the text box part data!
Please help to extract the text box part data!

Time:10-25


Vb form read text box data, such as 067309010000100010010
How to extract some data turned it into 73090100001-0001

CodePudding user response:

First clear what are the rules, and then use the mid function to extract

CodePudding user response:

 Option Explicit 

Private Sub Command1_Click ()
Dim strTmp As String

Text1="067309010000100010010"

StrTmp=Mid (Text1, 3, 11) & amp; "-" & amp; Mid (Text1, 14, 4)
MsgBox strTmp
'73090100001-0001
End Sub

CodePudding user response:

You haven't said that according to the rules to take
Mainly rules
Commonly used functions are mid left right InStr
This a few should be enough
  • Related