Article View: pl.comp.lang.vbasic
Article #92244Re: Excel i VBA - reguła poprawności
From: Piotr Lipski
Date: Thu, 20 Oct 2005 09:47
Date: Thu, 20 Oct 2005 09:47
20 lines
1490 bytes
1490 bytes
Dnia 20 Oct 2005 11:04:26 +0200, kkle@poczta.onet.pl napisał(a):
> Witam,
>
> wie ktoś może jak w Excelu w VBA zrobić coś takiego:
> mam tabelę z podsumowaniami na dole i chiałbym, aby w sytuacji gdy wartość sumy
> przekroczny np. 100, pojawiało się okienko (monit) z klawiszem OK na środku i
> np. informacją: "Wartość większa od 100!!!". Coś na wzór reguły poprawności w
> Accessie...
Można, np. tak:
Private Sub Worksheet_Change(ByVal Target As Range)
If Application.Range("komorka_z_suma").Value > 100 Then
MsgBox "Za dużo!!!", vbOKOnly + vbExclamation
End If
End Sub
--
PL
Technical Details
Message-ID:
<dj7p0t$b8q$1@news.onet.pl>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!news.onet.pl!not-for-mailReferences:
<5af6.0000176a.43575d99@newsgate.onet.pl>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!news.onet.pl!not-for-mail From: Piotr Lipski <piotr.lipski@nie.p0czta.spamuj.b0.onet.w.ryj.pl> Newsgroups: pl.comp.lang.vbasic Subject: Re: Excel i VBA - reguła poprawności Date: Thu, 20 Oct 2005 11:47:41 +0200 Organization: Onet.pl Lines: 20 Sender: Piotr Lipski <> Message-ID: <dj7p0t$b8q$1@news.onet.pl> References: <5af6.0000176a.43575d99@newsgate.onet.pl> NNTP-Posting-Host: farmfrites.ext.ids.pl Mime-Version: 1.0 X-Trace: news.onet.pl 1129801565 11546 213.77.126.170 (20 Oct 2005 09:46:05 GMT) X-Complaints-To: usenet@news.onet.pl NNTP-Posting-Date: Thu, 20 Oct 2005 09:46:05 +0000 (UTC) X-Sender: k8V2QDKeTIFe2ZofQR+7UwJQvFq7Hofm8IvhXReqMQ4= User-Agent: 40tude_Dialog/2.0.15.1pl Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit