Article View: pl.comp.lang.vbasic
Article #92476Re: Pole tekstowe
From: Karlo
Date: Mon, 31 Oct 2005 15:37
Date: Mon, 31 Oct 2005 15:37
24 lines
1691 bytes
1691 bytes
stayheavy wrote:
> Witam,
>
> Mam taki problem: mam pole tekstowe ktore przyjmuje wartosci liczbowe z
> przedzial 0-255 i przerzuca ta wartosc do pictureboxa ktory w tym momencie
> zmienia kolor na odpowiedni. W momenie kiedy wpisuje sie liczby, wszystko
> gra i buczy, ale przy probie wpisania jakiegokolwiek innego znaku program
> sie wywala. Jak to obejsc?
>
A może spróbujesz czegoś takiego?
If IsNumeric(Me.Text1.Text) Then
If (Int(Me.Text1.Text) < 0) Or (Int(Me.Text1.Text) > 255) Then
MsgBox "Proszę wprowadzić liczbę z zakresu 0-255"
Else
'.....Wykonywany kod
End If
Else
MsgBox "Proszę wprowadzić LICZBĘ z zakresu 0-255"
End If
Pozdrówka
Karlo
Technical Details
Message-ID:
<dk5dg1$aa3$1@nemesis.news.tpi.pl>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!mat.uni.torun.pl!news.man.torun.pl!newsfeed.pionier.net.pl!news.nask.pl!news.nask.org.pl!newsfeed.tpinternet.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mailReferences:
<dk58kf$8lp$1@atlantis.news.tpi.pl>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!mat.uni.torun.pl!news.man.torun.pl!newsfeed.pionier.net.pl!news.nask.pl!news.nask.org.pl!newsfeed.tpinternet.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail From: Karlo <karlo47@wp.pl> Newsgroups: pl.comp.lang.vbasic Subject: Re: Pole tekstowe Date: Mon, 31 Oct 2005 16:37:18 +0100 Organization: tp.internet - http://www.tpi.pl/ Lines: 25 Message-ID: <dk5dg1$aa3$1@nemesis.news.tpi.pl> References: <dk58kf$8lp$1@atlantis.news.tpi.pl> Reply-To: karlo47@wp.pl NNTP-Posting-Host: host-ip242-226.crowley.pl Mime-Version: 1.0 X-Trace: nemesis.news.tpi.pl 1130772801 10563 62.111.226.242 (31 Oct 2005 15:33:21 GMT) X-Complaints-To: usenet@tpi.pl NNTP-Posting-Date: Mon, 31 Oct 2005 15:33:21 +0000 (UTC) User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: en-us, en In-Reply-To: <dk58kf$8lp$1@atlantis.news.tpi.pl> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit