Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Slow performance after print preview | Excel Discussion (Misc queries) | |||
Performance | Excel Discussion (Misc queries) | |||
Performance IF(IF or IF(AND | Excel Worksheet Functions | |||
XLL performance in NT and XP | Excel Programming | |||
Bad performance | Excel Programming |