🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.vbasic
Article #92272

Re: Jak w *.xls usunąć autora komentarza?

#92272
From: Stanislaw
Date: Fri, 21 Oct 2005 08:28
27 lines
1925 bytes
Rozwiązując kompleksowo Twój problem proponuję:

Sub Makro()

Dim kształt     As Shape
Dim komentarz   As Comment
Dim pusty       As String

For Each kształt In ActiveSheet.Shapes
    If kształt.Type <> msoComment Then _
       kształt.Delete
Next kształt

For Each komentarz In ActiveSheet.Comments
    pusty = Replace(komentarz.Text, _
            Application.UserName & ":", "", , , vbTextCompare)
    komentarz.Text pusty
Next komentarz

End Sub

Co prawda robię to w dwóch pętlach,
ale póki co nie mogę sobie poradzić
z "upchaniem" kodu w jednej pętli.

--
Stanislaw
Technical Details
Message-ID: <1129883336.717627.107690@g43g2000cwa.googlegroups.com>
Path: mbox-mo1.pugleaf.net!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!g43g2000cwa.googlegroups.com!not-for-mail
References: <d7b21$435806bd$3eb35d81$963@news.chello.pl> <1129844818.216627.167640@g49g2000cwa.googlegroups.com> <708c5$43589af9$3eb35d81$26394@news.chello.pl> <1129881417.961033.82360@g47g2000cwa.googlegroups.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!g43g2000cwa.googlegroups.com!not-for-mail
From: "Stanislaw" <stanislaw_@op.pl>
Newsgroups: pl.comp.lang.vbasic
Subject: Re: Jak w *.xls usunąć autora komentarza?
Date: 21 Oct 2005 01:28:56 -0700
Organization: http://groups.google.com
Lines: 28
Message-ID: <1129883336.717627.107690@g43g2000cwa.googlegroups.com>
References: <d7b21$435806bd$3eb35d81$963@news.chello.pl> <1129844818.216627.167640@g49g2000cwa.googlegroups.com> <708c5$43589af9$3eb35d81$26394@news.chello.pl> <1129881417.961033.82360@g47g2000cwa.googlegroups.com>
NNTP-Posting-Host: 80.50.68.122
Mime-Version: 1.0
X-Trace: posting.google.com 1129883341 10472 127.0.0.1 (21 Oct 2005 08:29:01 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Fri, 21 Oct 2005 08:29:01 +0000 (UTC)
User-Agent: G2/0.2
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; exNetPanel:292739; SV1; npUID:292739; .NET CLR 1.1.4322),gzip(gfe),gzip(gfe)
Complaints-To: groups-abuse@google.com
Injection-Info: g43g2000cwa.googlegroups.com; posting-host=80.50.68.122; posting-account=q9SwWg0AAACsZGpqQVbocTuYdhIZQRhD
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit