Results 1 to 2 of 2

Thread: (X,Y) as a variable

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 1999
    Location
    ma,usa
    Posts
    485

    Post

    Hi,
    I've been trying to assign a string variable which holds the x and y coordinates to a Pset function and can't do it without errors.here's an example:

    strBlah = (356,789)
    pset strBlah

    If I can't make this work is there a way to parse the string so I can assign the variables back to seperate x and y values?
    p.s.



  2. #2
    Guest

    Post

    If you are working in VB6 you can use the Split function
    to split the string.

    Code:
    Dim sString() As String
    Dim strBlah As String
    
    Dim x As Integer
    Dim y As Integer
    
    strBlah = "356,789"
    
    sString = Split(strBlah, ",", -1, vbTextCompare)
    
    X = sString(1)
    y = sString(2)
    pset x, y

    -Kayoca Mortation


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width