Click here to Skip to main content
15,889,808 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionRecent files again Pin
Cedrickdeorange9-Sep-07 1:26
Cedrickdeorange9-Sep-07 1:26 
AnswerRe: Recent files again Pin
Christian Graus9-Sep-07 3:00
protectorChristian Graus9-Sep-07 3:00 
QuestionPlease Help me!! Pin
buzz59588-Sep-07 20:06
buzz59588-Sep-07 20:06 
AnswerRe: Please Help me!! Pin
Tamimi - Code8-Sep-07 21:44
Tamimi - Code8-Sep-07 21:44 
GeneralRe: Please Help me!! Pin
buzz59589-Sep-07 3:42
buzz59589-Sep-07 3:42 
GeneralRe: Please Help me!! Pin
Christian Graus9-Sep-07 4:09
protectorChristian Graus9-Sep-07 4:09 
GeneralRe: Please Help me!! Pin
buzz59589-Sep-07 4:14
buzz59589-Sep-07 4:14 
GeneralRe: Please Help me!! Pin
Christian Graus9-Sep-07 6:37
protectorChristian Graus9-Sep-07 6:37 
buzz5958 wrote:
Dim txtPhone As String
Dim phone(11) As String


txtPhone = CStr("xxx - xxx - xxxx")
phone(11) = CStr("xxx - xxx - xxxx")
phone(3) = CStr("xxx")


This code is useless. Get rid of it. why do you need an array of strings ?


buzz5958 wrote:
btnPush.ToString.Substring(0, 3)


This code gets a string from a button ( presumably 'Button' ) and returns a substring ( presumably 'But' ).

buzz5958 wrote:
txtArea.Text = ("xxx")


The brackets in this code are superfluous, and this code sets the area code to be three x's.

It seems to me that you're wildly guessing, which is both not going to work, and not going to teach you anything if it manages to. You've got the substring method, so what do you want to get the substring of ? I assume you have a control which contains the phone number ( txtPhone is a good name for this control ). It has a Text property. This gives you the entered string. If you're allowed to assume a very specific input format, then the Substring method, on the text property of this control, will return the area code.

In future, I recommend you read through your textbooks and try to understand the process, instead of making wild guesses.



Christian Graus - Microsoft MVP - C++

"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

GeneralRe: Please Help me!! Pin
Paul Conrad9-Sep-07 6:55
professionalPaul Conrad9-Sep-07 6:55 
GeneralRe: Please Help me!! Pin
Paul Conrad9-Sep-07 6:22
professionalPaul Conrad9-Sep-07 6:22 
GeneralRe: Please Help me!! Pin
Christian Graus9-Sep-07 6:34
protectorChristian Graus9-Sep-07 6:34 
GeneralRe: Please Help me!! Pin
Paul Conrad9-Sep-07 6:37
professionalPaul Conrad9-Sep-07 6:37 
GeneralRe: Please Help me!! Pin
Christian Graus9-Sep-07 6:39
protectorChristian Graus9-Sep-07 6:39 
GeneralRe: Please Help me!! Pin
buzz59589-Sep-07 7:51
buzz59589-Sep-07 7:51 
GeneralRe: Please Help me!! Pin
Paul Conrad9-Sep-07 7:57
professionalPaul Conrad9-Sep-07 7:57 
AnswerRe: Please Help me!! Pin
Colin Angus Mackay9-Sep-07 0:06
Colin Angus Mackay9-Sep-07 0:06 
QuestionProgrammatically vertical datagrid scroll issues Pin
jensenx8-Sep-07 19:49
jensenx8-Sep-07 19:49 
QuestionPlz help for print? Pin
chintuu18-Sep-07 6:09
chintuu18-Sep-07 6:09 
AnswerRe: Plz help for print? Pin
Paul Conrad8-Sep-07 16:36
professionalPaul Conrad8-Sep-07 16:36 
Questionhow to create a websetup file? Pin
rrrriiizz7-Sep-07 23:49
rrrriiizz7-Sep-07 23:49 
AnswerRe: how to create a websetup file? [modified] Pin
Dave Kreskowiak8-Sep-07 2:49
mveDave Kreskowiak8-Sep-07 2:49 
Questionvb.net Pin
abcumesh7-Sep-07 22:35
abcumesh7-Sep-07 22:35 
AnswerRe: vb.net Pin
Hadi Hassan7-Sep-07 23:09
Hadi Hassan7-Sep-07 23:09 
AnswerRe: vb.net Pin
nishkarsh_k8-Sep-07 9:50
nishkarsh_k8-Sep-07 9:50 
AnswerRe: Office.Word Question Pin
Dave Kreskowiak8-Sep-07 2:47
mveDave Kreskowiak8-Sep-07 2:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.