Microsoft
Software
Hardware
Network
Question : VB.NET: check last characters of a substring
Hi X-perts,
I need to check last four characters of a string like
If (Me.textbox1.Text.Substrin
g(Me.textb
ox1.Text.L
ength - 4, 4) = ".zip") Then
end if
The problem is that it generates an exception of its length < 4.
Is there a way of checking it without adding another outer if?
Thanks
Answer : VB.NET: check last characters of a substring
In the above code you should add this
Imports Microsoft.VisualBasic
or you can do something like:
1: 2: 3:
If Microsoft.VisualBasic.Right(Textbox1.text,4) = ".zip" then End If
Open in New Window
Select All
Random Solutions
VBA Variable as DLookup Criteria
Convert Access 95/97 to Access 2000 MDE
Moving public folders from Exchange 2007 to Exchange 2003 - Different Organisations
Access, non-print a null field.
HELP, I fallen on a 'Runtime Error 3134 Syntax error in INSERT INTO statement' and i can't get up!
Using More Than 1 Delimiter In Excel 2007 (Pipe & Comma)
Query runs fine for most but not for two people...???
convert between email address to ip address
outlook vba to saveas .msg allowing user to navigate to target folder.
WINDOWS SERVER 2008 BACKUP