OberonPlace.com Forums

OberonPlace.com Forums (http://forum.oberonplace.com/index.php)
-   CorelDRAW/Corel DESIGNER VBA (http://forum.oberonplace.com/forumdisplay.php?f=16)
-   -   Split string to values (http://forum.oberonplace.com/showthread.php?t=24756)

nic 17-04-2016 05:56

Split string to values
 
Hi
Im using excel to get rgb values for colouring objects and would like to find a way of using coreldraw's VBA to convert a string with values in the format "127, 23, 250" (ie a string containing 3 numbers separated by 2 commas) to 3 separate variables each containing a numerical value.

Help appreciated.

nic

shark 18-04-2016 07:51

Code:

Private Sub TestSplit()
Dim Test As Variant
    Test = Split("127, 23, 250", ",")
End Sub

After this code Test(0) contains 127, Test(1)=23 and test(2)=250

nic 18-04-2016 11:20

Thanks Shark - really appreciate your help.
nic


All times are GMT -5. The time now is 04:38.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com