OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Developer Forums > VBA > CorelDRAW/Corel DESIGNER VBA

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 03-05-2007, 00:12
norbert_ds
Guest
 
Posts: n/a
Default Characters to the right of a special character

Hi All,

I read about the InStrRev Command which gets characters to the Left of a special character for eg:",".

How about doing the same for getting all the characters to the right of a special character?

Thanks
Norbert
Reply With Quote
  #2  
Old 03-05-2007, 06:59
wOxxOm's Avatar
wOxxOm wOxxOm is offline
Senior Member
 
Join Date: Mar 2005
Posts: 836
Default

Code:
s="a, b, c, d"
i=instr(s, ",")  '--->2
j=instrrev(s, ",")  '--->8

if i<>0 then s1=left$(s,i-1)  '---> a
if j<>0 then s2=mid$(s,j+1) '---> ' d'
why not use help? it's the basics of Basic :-)
Reply With Quote
  #3  
Old 03-05-2007, 09:16
Alex's Avatar
Alex Alex is offline
Administrator
 
Join Date: Nov 2002
Posts: 1,941
Blog Entries: 4
Default

Quote:
Originally Posted by norbert_ds View Post
Hi All,

I read about the InStrRev Command which gets characters to the Left of a special character for eg:",".

How about doing the same for getting all the characters to the right of a special character?

Thanks
Norbert
Actually, InStrRev just finds the position of a substring from the end of a string. Then you can use Left/Right/Mid string functions to extract the characters before/after that position as wOxxOm illustrated
Reply With Quote
  #4  
Old 03-05-2007, 21:59
norbert_ds
Guest
 
Posts: n/a
Default

Thanks guys,

Actually I did get a solution to this before wOxxOm illustrated his code and yes with help!

Thanks Sincerely
Norbert
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
CDR12: TTF Font exporting - specify character code zlatev CorelDRAW/Corel DESIGNER VBA 0 03-12-2005 06:54
HP 8550 print special character problem petu CorelDRAW/Corel DESIGNER VBA 0 21-07-2005 23:04
insert a character by vba beny04 CorelDRAW/Corel DESIGNER VBA 8 16-05-2005 03:45
how to insert a character CHR(216)? ama CorelDRAW/Corel DESIGNER VBA 2 17-03-2004 08:55
Special Characters Craig Tucker CorelDRAW/Corel DESIGNER VBA 3 12-03-2003 12:57


All times are GMT -5. The time now is 05:45.


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