/ Forside / Teknologi / Udvikling / VB/Basic / Nyhedsindlæg
Login
Glemt dit kodeord?
Brugernavn

Kodeord


Reklame
Top 10 brugere
VB/Basic
#NavnPoint
berpox 2425
pete 1435
CADmageren 1251
gibson 1230
Phylock 887
gandalf 836
AntonV 790
strarup 750
Benjamin... 700
10  tom.kise 610
text-conversion question
Fra : sjoerd


Dato : 04-12-02 13:53

Hi,

Two questions about text-conversion. I read the content of a folder. This
folder contain file with a filename with the following structure:

First Part Of Name - Second Part Of Name

For this file I want to change this in:

------------------------------------------
first part of name - second part of name
(change Upper to lowercast)
------------------------------------------

------------------------------------------
second part of name - first part of name
(switch the parts for and after the " - "
------------------------------------------

Is this possible in VB? Think so, but don't know how...

Thanks,

Sjoerd



 
 
Carsten Suurland (06-12-2002)
Kommentar
Fra : Carsten Suurland


Dato : 06-12-02 13:13

Dim FileName As String
FileName = "FirstPartOfName - LastPartOfName"

Dim LowerCase As String
LowerCase = LCase(FileName)

Dim Parts
Parts = Split(LowerCase, "-")

Dim ReversedName As String
ReversedName = Parts(UBound(Parts)) & "-" & Parts(LBound(Parts))

/Carsten Suurland



Søg
Reklame
Statistik
Spørgsmål : 177557
Tips : 31968
Nyheder : 719565
Indlæg : 6408880
Brugere : 218888

Månedens bedste
Årets bedste
Sidste års bedste