Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Print Performance in VBA

Probably not.

Next time you're in the VBE, look at the project explorer window.

If you expand the objects, you'll see something like:

Sheet2 (Sheet2)
or
Sheet2 (SheetnameYouSeeOnTheTabInExcel)

The name on the left is called the Codename. The name in parentheses is the
name (what's seen on the tab in excel).

My bet is the original poster was refering to the Codename of the worksheet.
This codename is usually much more difficult for the average user to change--and
isn't susceptible to any sheet name changes that the user may make.

Sheets("sheetnamehere").printout
would fail if the user renamed "sheetnamehere" to something else.

And if the user reordered the tabs, then
sheets(2).printout
may not print the sheet that the developer wanted.
This will print the second sheet (starting on the left).

Using codenames in your macros will make your code more robust.

=====
The original poster could have declared a variable and named it Sheet2, but
that's pretty unlikely--and with a variable with a name like that would confuse
the heck out of me!

JP wrote:

Guys,

Isn't the syntax supposed to be

Sheets(2).PrintOut

?

--JP

On Oct 4, 6:23 pm, ISS6 wrote:
The report is formatted to Sheet very quickly. However, the actual command
PrintOut is extremely slow in executing. It just sits there on this line for
up to a minute, do what I have no idea. Maybe waiting for the printer to
power up? (The printer is on all the time, but I think it goes into a
standby mode to conserve energy) Whatever happened to the Windows print
spooler? I thought that the spooler was an automatic part of Windows, but
maybe I need to manage it programatically?


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Slow performance after print preview SV[_2_] Excel Discussion (Misc queries) 1 October 30th 09 12:24 PM
Performance Joannie Excel Discussion (Misc queries) 2 March 26th 08 05:21 PM
Performance IF(IF or IF(AND Paul Dennis Excel Worksheet Functions 2 July 20th 06 05:24 PM
XLL performance in NT and XP [email protected] Excel Programming 3 November 21st 05 10:36 AM
Bad performance jim Excel Programming 2 January 30th 05 03:08 PM


All times are GMT +1. The time now is 02:09 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"