Split Function returns a zero-based, one-dimensional array containing a specified number of substrings.
Function DND_Split_Example()
Dim arTempVB2005() As String
Dim arTempVB6() As String
Dim arTempSpace() As String
Dim sSplitString As String
sSplitString = "MyName||MyAge||MySex"
arTempVB2005 = sSplitString.Split("||")
arTempVB6 = Microsoft.VisualBasic.Split(sSplitString, "||")
arTempSpace = Split("Split By Spaces”)
End Function
Here are the overloaded examples of Split Function
Split Call | Return Value |
| {"42," , "12," , "19"} |
| {"42", "12", "19"} |
| {"42", "12, 19"} |
| {"192", "168", "0", "1"} |
| {"Alice and Bob"} |
| {"Alice", "Bob"} |
| {"someone@example.com"} |
| {"someone", "example.com"} |
Hi..
ReplyDeleteI have created a command button dynamically as under
Dim C1 As CommandButton
Form1.Controls.Add "VB.commandbutton", "C1", Form1
With Form1!C1
.Visible = True
.Caption = "Find Square Root"
.Width = 2000
.Top = 3700
.Left = 1000
End With
Now I want to add click event to this button.
How can I?
Vijaykumar Dave
vijaykumardave@gmail.com
Handling .NET Events with WithEvents
ReplyDeleteCan you try the following:
http://www.developerfusion.com/samplechapter/4375/building-windows-applications/3/