-
I have a string...
NewString(0) = "File1.txt"
I need to seperate it to
"file1"
But I dont need it stored ..
Just need to code so the
computer sees it without
storing it..
How can I do that?
Something like this:
If BeforePeriod(String1(0)) = "Text1" then
end if
-
Code:
Dim s As String
s = "file1.txt"
Debug.Print Strings.Left(s, InStr(1, s, ".") - 1)
-
<?>
Code:
Private Sub Command1_Click()
NewString(0) = "File1.txt"
If Left(NewString(0), 5) = "File1" Then
MsgBox "Do Whatever"
End If
End Sub
-
Code:
Dim intPeriodPos As Integer
Dim strTextBefPer As String
intPeriodPos = Instr(NewString(0), ".")
strTextBefPer = Left$(NewString(0), intPeriodPos - 1)
If strTextBefPer = "whatever" Then ...