Splitting and Sending [RESOLVED]
I want to split a number , lets say 1435 by every single number so I get an array that returns Number(0) = 1, Number(1) = 4, Number(2) = 3, Number(3) = 5. How do I do that?
Also I need it so that a String, strPath, has the same data as all forms of the project. How do i dot that?
Re: Splitting and Sending
Define strPath as a global variable in a module.
VB Code:
Dim MyNumber() As Integer
Dim SplitNumber As Long
Dim i As Integer
SplitNumber = "1435"
ReDim MyNumber(Len(SplitNumber))
For i = 1 To Len(SplitNumber)
MyNumber(i) = Mid$(SplitNumber, i, 1)
Next
Re: Splitting and Sending
Quote:
Originally Posted by Prodian
Also I need it so that a String, strPath, has the same data as all forms of the project. How do i dot that?
Ahh... What ? :confused:
Re: Splitting and Sending
VB Code:
Dim i As Long
Dim a As String
Dim b() As Byte
a = "12345"
b = a
Debug.Print a, UBound(b)
For i = 0 To UBound(b) Step 2
Debug.Print Chr(b(i)), Chr(b(i + 1))
Next i
Now every even element will contain the ascii value of the character from the string.
Re: Splitting and Sending
Quote:
Originally Posted by CVMichael
Ahh... What ? :confused:
I have this string that holds the path of a file on one form. I want another form to have the same string with the same value, and if it is cahnged on one form it will be changed on the other.
Re: Splitting and Sending
Make a global (Public) variable or give the form a property that returns this string and let all other forms refer to this property.
Re: Splitting and Sending
Thanks for the quick responses.