Click here to Skip to main content
15,917,005 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Questionexcel data Pin
kiranknair7-Dec-06 22:09
kiranknair7-Dec-06 22:09 
QuestionAnyone know why i'm getting this message Pin
The ANZAC7-Dec-06 20:30
The ANZAC7-Dec-06 20:30 
AnswerRe: Anyone know why i'm getting this message Pin
Michael P Butler7-Dec-06 21:09
Michael P Butler7-Dec-06 21:09 
GeneralFixed one issue now i have another question. Pin
The ANZAC7-Dec-06 22:40
The ANZAC7-Dec-06 22:40 
GeneralRe: Fixed one issue now i have another question. Pin
Dayekh8-Dec-06 0:10
Dayekh8-Dec-06 0:10 
GeneralRe: Fixed one issue now i have another question. Pin
The ANZAC8-Dec-06 0:23
The ANZAC8-Dec-06 0:23 
GeneralRe: Fixed one issue now i have another question. Pin
Dayekh8-Dec-06 0:49
Dayekh8-Dec-06 0:49 
GeneralFound a good way to Validate if anyone's interested [modified] Pin
The ANZAC8-Dec-06 16:17
The ANZAC8-Dec-06 16:17 
Simply define what the user can and can't put in.
Use this in the forms keydown (make sure keypreview is enabled) to determine if it's a number or a letter:

<br />
        Alpha = False<br />
<br />
        If e.KeyCode < Keys.D0 OrElse e.KeyCode > Keys.D9 Then<br />
            If e.KeyCode < Keys.NumPad0 OrElse e.KeyCode > Keys.NumPad9 Then<br />
                Alpha = True<br />
            End If<br />
        End If<br />
        If e.KeyCode = Keys.Back Then<br />
            AllowBack = True<br />
        Else<br />
            AllowBack = False<br />
        End If 


Then use this in the field's keypress if you only want letters and other characters:

If Alpha = True Then<br />
         e.Handled = False<br />
     Else<br />
         e.Handled = True<br />
     End If


And use this in the field's keypress if you only want numbers and not other characters:

If Alpha = True Then<br />
            e.Handled = True<br />
        Else<br />
            e.Handled = False<br />
        End If<br />
        If AllowBack = True Then<br />
            e.Handled = False<br />
        End If



-- modified at 0:13 Saturday 9th December, 2006

Posted by The ANZAC

QuestionSingle click on a checked list box Pin
steve_rm7-Dec-06 19:04
steve_rm7-Dec-06 19:04 
AnswerRe: Single click on a checked list box [modified] Pin
steve_rm7-Dec-06 19:13
steve_rm7-Dec-06 19:13 
QuestionVirtual Printer Driver in Vb.net Pin
sandeegk777-Dec-06 18:24
sandeegk777-Dec-06 18:24 
QuestionSearch Database Pin
The ANZAC7-Dec-06 18:05
The ANZAC7-Dec-06 18:05 
AnswerRe: Search Database Pin
Christian Graus7-Dec-06 18:40
protectorChristian Graus7-Dec-06 18:40 
GeneralRe: Search Database Pin
The ANZAC7-Dec-06 18:44
The ANZAC7-Dec-06 18:44 
QuestionSet blank for 1st item combolist in VSFlexGrid Pin
angelagke7-Dec-06 17:05
angelagke7-Dec-06 17:05 
QuestionVB script not workng on Win 2000 Pin
japel7-Dec-06 10:53
japel7-Dec-06 10:53 
QuestionRound to nearest quarter of hour Pin
VK-Cadec7-Dec-06 10:07
VK-Cadec7-Dec-06 10:07 
AnswerRe: Round to nearest quarter of hour Pin
Uber17-Dec-06 15:51
Uber17-Dec-06 15:51 
GeneralRe: Round to nearest quarter of hour Pin
Uber17-Dec-06 16:28
Uber17-Dec-06 16:28 
QuestionC++ and VB.NET Pin
Kornfeld Eliyahu Peter7-Dec-06 9:39
professionalKornfeld Eliyahu Peter7-Dec-06 9:39 
QuestionHow to get multiple key states simultaneously Pin
Gregbob7-Dec-06 7:41
Gregbob7-Dec-06 7:41 
AnswerRe: How to get multiple key states simultaneously Pin
Christian Graus7-Dec-06 8:11
protectorChristian Graus7-Dec-06 8:11 
QuestionHow to control tab size Pin
adairjk7-Dec-06 5:58
adairjk7-Dec-06 5:58 
Questionmdi application error Pin
kharkov927-Dec-06 5:15
kharkov927-Dec-06 5:15 
AnswerRe: mdi application error Pin
minhnguyen089-Dec-06 1:04
minhnguyen089-Dec-06 1:04 

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.