🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Excel (VBA) Wolne wykonywanie ustawienia własciwosci obiektu PageSetup

#104342
From: romek
Date: Tue, 20 Oct 2009 07:00
39 lines
2649 bytes
Witam!
Szukam rozwiązania problemu wolnego wykonywania sekwencji kodu jak niżej:
Wykonanie każdej linijki zajmuje parę sekund.
Szukałem rozwiązania, które wyłącza czasowo odświeżanie i które po ponownym 
włączeniu pozwoli na równoczesne ustawienie wszystkich właściwości.
Czas wykonania poniższych instrukcji najgorszy jest dla drukarki sieciowej 
ustawionej jako domyślnej, a najlepszy dla drukarki lokalnej (PDFCreator).
Ustawienie Application.ScreenUpdating w niczym nie pomogło.
Pozdrawiam

Romek

    With ActiveSheet.PageSetup
        .PrintTitleRows = "$5:$6"
        .PrintTitleColumns = ""
        .LeftHeader = ""
        .CenterHeader = Application.ActiveSheet.Name
        .RightHeader = "Strona &P"
        .LeftMargin = Application.InchesToPoints(0.393700787401575)
        .RightMargin = Application.InchesToPoints(0.196850393700787)
        .TopMargin = Application.InchesToPoints(0.33)
        .BottomMargin = Application.InchesToPoints(0.236220472440945)
        .HeaderMargin = Application.InchesToPoints(0.196850393700787)
        .FooterMargin = Application.InchesToPoints(0.236220472440945)
        .PrintHeadings = False
        .PrintGridlines = False
        .PrintComments = xlPrintNoComments
        .CenterHorizontally = False
        .CenterVertically = False
        .Orientation = xlPortrait 'xlLandscape
        .Draft = False
        .PaperSize = xlPaperA4
        .FirstPageNumber = xlAutomatic
        .Order = xlDownThenOver
        .BlackAndWhite = False
        .Zoom = False
        .FitToPagesWide = 1
        .FitToPagesTall = 6
    End With
Technical Details
Message-ID: <hbjnr1$lga$1@nemesis.news.neostrada.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.rmf.pl!agh.edu.pl!news.agh.edu.pl!news.onet.pl!newsfeed.neostrada.pl!atlantis.news.neostrada.pl!news.neostrada.pl!not-for-mail

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.rmf.pl!agh.edu.pl!news.agh.edu.pl!news.onet.pl!newsfeed.neostrada.pl!atlantis.news.neostrada.pl!news.neostrada.pl!not-for-mail
From: "romek" <romek@karolina.info.pl>
Newsgroups: pl.comp.lang.vbasic
Subject: Excel (VBA) Wolne wykonywanie ustawienia
 własciwosci obiektu PageSetup
Date: Tue, 20 Oct 2009 09:00:55 +0200
Organization: TP - http://www.tp.pl/
Lines: 41
Message-ID: <hbjnr1$lga$1@nemesis.news.neostrada.pl>
NNTP-Posting-Host: izg41.internetdsl.tpnet.pl
X-Trace: nemesis.news.neostrada.pl 1256022689 22026 95.48.136.41 (20 Oct 2009 07:11:29 GMT)
X-Complaints-To: usenet@news.neostrada.pl
NNTP-Posting-Date: Tue, 20 Oct 2009 07:11:29 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5843
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
X-RFC2646: Format=Flowed; Original
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit