![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Feb 2005
Posts: 13
Rep Power: 0
![]() |
Split
|
|
|
|
|
|
#2 |
|
Programming Guru
![]() ![]() |
for this to work heading_range has to be a array type varible.
dim heading_range() AS string heading_range() = split(garulescolor(j), "/", vbTextCompare) the split function returns a array, that's why you have to declair heading_range as one. Although, i can't remember if you have to redim it before filling it. Try it out. The vbTextCompare is optional, so you don't have to use it if you don't want to. Note split is only for version 6.0 and up of VB.
__________________
Profanity is the one language that all programmers understand. Check out my Blog <---updated Nov 30 2007! |
|
|
|
|
|
#3 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
Two things: you don't have to redim it, Piz, and you should probably remove the parentheses after "headingtext" on line 3.
|
|
|
|
|
|
#4 | |
|
Programming Guru
![]() ![]() |
Quote:
heh, can you tell that i hardly use VB anymore?
__________________
Profanity is the one language that all programmers understand. Check out my Blog <---updated Nov 30 2007! |
|
|
|
|
|
|
#5 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
I haven't used it in over a year, and I still know what I'm talking about. :p
|
|
|
|
|
|
#6 |
|
Programming Guru
![]() ![]() |
yeah, it's almost two for me.
__________________
Profanity is the one language that all programmers understand. Check out my Blog <---updated Nov 30 2007! |
|
|
|
|
|
#7 | |
|
Expert Programmer
|
Quote:
![]() |
|
|
|
|
|
|
#8 |
|
Troll
Join Date: Apr 2005
Location: Texas
Posts: 732
Rep Power: 4
![]() |
Counting the whitespace. So the second line of code that Piz gave.
|
|
|
|
|
|
#9 |
|
Newbie
Join Date: Apr 2005
Location: The Netherlands
Posts: 20
Rep Power: 0
![]() |
dim blabla as string
blabla = "1/2/3/4/5" dim third as string third = split(blabla,"/",,vbtextcompare)(2) |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|