•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the VB.NET section within the Software Development category of DaniWeb, a massive community of 397,664 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,339 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our VB.NET advertiser:
Views: 3218 | Replies: 3
•
•
Join Date: Apr 2007
Posts: 5
Reputation:
Rep Power: 0
Solved Threads: 0
I have a problem with "left"syntax
when i operate it in console application, it works
but when i operate it in windows application, the left syntax is error...
this is my code, can someone check my code please
' get and validate order no
Dim strOrderNo As String = _ ValidateOrderNumber(txtOrderNumber.Text)
If strOrderNo = "" Then
MessageBox.Show("Error: Invalid Order Number")
With txtOrderNumber
.SelectAll()
.Focus()
End With
Return
End If
Private Function ValidateOrderNumber(ByRef strOrderNo As String) _ As String
strOrderNo = strOrderNo.ToUpper
If Left(strOrderNo, 2) <> "SO" Then
' returns an empty string to denote error
Return ""
End If
' return valid order no
Return strOrderNo
End Function
the description say that 'Public Property Left() As Integer' has no parameters and its return type cannot be indexed.
can someone help me please..............
thanks
when i operate it in console application, it works
but when i operate it in windows application, the left syntax is error...
this is my code, can someone check my code please
' get and validate order no
Dim strOrderNo As String = _ ValidateOrderNumber(txtOrderNumber.Text)
If strOrderNo = "" Then
MessageBox.Show("Error: Invalid Order Number")
With txtOrderNumber
.SelectAll()
.Focus()
End With
Return
End If
Private Function ValidateOrderNumber(ByRef strOrderNo As String) _ As String
strOrderNo = strOrderNo.ToUpper
If Left(strOrderNo, 2) <> "SO" Then
' returns an empty string to denote error
Return ""
End If
' return valid order no
Return strOrderNo
End Function
the description say that 'Public Property Left() As Integer' has no parameters and its return type cannot be indexed.
can someone help me please..............
thanks
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb VB.NET Marketplace
- IE Syntax Error and Can“t browse some sites (Viruses, Spyware and other Nasties)
- Syntax Analyser and General Java Help (Java)
- DECLARATION SYNTAX ERROR (for bc 31 user) (C++)
- C++ Syntax (C++)
Other Threads in the VB.NET Forum
- Previous Thread: Connecting to a SQL server on another XP computer
- Next Thread: add radiobutton list or checkboxes list



Threaded Mode