|
-
Sep 28th, 2006, 07:00 AM
#1
Thread Starter
Member
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?
Last edited by Prodian; Sep 28th, 2006 at 07:56 AM.
-
Sep 28th, 2006, 07:05 AM
#2
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
-
Sep 28th, 2006, 07:13 AM
#3
Re: Splitting and Sending
 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 ?
-
Sep 28th, 2006, 07:32 AM
#4
Frenzied Member
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.
-
Sep 28th, 2006, 07:39 AM
#5
Thread Starter
Member
Re: Splitting and Sending
 Originally Posted by CVMichael
Ahh... What ? 
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.
Last edited by Prodian; Sep 28th, 2006 at 07:42 AM.
-
Sep 28th, 2006, 07:51 AM
#6
Frenzied Member
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.
-
Sep 28th, 2006, 07:56 AM
#7
Thread Starter
Member
Re: Splitting and Sending
Thanks for the quick responses.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|