Excel Print Routine Help

I was able to get it to work, and will post my test sheet up in a.b.s.e momentarily.

I had the same issue you did, and fount the cause to be cell formatting issues. The cell must be formatted as a number, and the cell, if filled from another location must have been filled as a number.

Reply to
Archimedes' Lever
Loading thread data ...

I saw several of your replies in abse, but don't understand what you are trying to tell me. Can you explain in text please?

Jim

--
"It is the mark of an educated mind to be able to entertain a thought 
without accepting it."
        --Aristotle
Reply to
RST Engineering (jw)

Did you download the attached spreadsheets? Did you hit the shortcut key, and see that only the correctly marked pages showed up in the print preview?

If so, then you see the sheet works as well as the macro. SO, if yours does not (mine originally didn't), I concluded that it MUST be due to cell formatting issues, as the macro works, and mine was fixed by hunting down improperly formatted cells. Your formula returns a numeric zero value, so the cell you are filling has to be filled with a numeric figure as well as be formatted numeric. A numeric cell will hold an alpha content, including a text based zero, which causes the failure.

My sheet skips any page with an N or a 0 in the F52 cell position. You can also nest another IF statement in there and have it skip sheets that have an empty cell value there as well. In fact, you can nest 7 levels of IF statements in there and test for several values in any cell position, so you have a lot of options.

The macro works. In print preview mode, you have to step through each page. In the full print command mode, it should go straight to the printer.

I don't know what I left out, but you didn't explain what you were confused about either. :-)

Reply to
Archimedes' Lever

I really appreciate your help, but I am firmly convinced that if every engineer in the world were forced to teach a freshman circuit analysis class for a couple of years that there would be far less confusion in the world. You soon find out that a "simple base bias circuit" ain't so simple if you haven't been doing it for a few dozen years.

Jim

-- "It is the mark of an educated mind to be able to entertain a thought without accepting it." --Aristotle

Yes I did. There were about five or six of them as I recall. THere was no comment on the difference between any of them.

What's a shortcut key? What is a "correctly marked" page?

That's nice. What is the solution?

In where?

and have it skip sheets that

I understand nested IFs. What is the point? All I care about is putting a character in a cell and if that character is there skipping the page in print mode.

So do you have to run the macro every time you print, or is there some "magic" autoload feature I'm not familiar with? What is a "print command" mode?

All of the above {;-)

Jim

Reply to
RST Engineering (jw)

Teaching is the ultimate educator. Having to explain something to another makes it sink into your own skull.

To this day I can teach Calculus and Circuit Analysis, sans book, all I need is an outline, so I don't forget a topic ;-)

...Jim Thompson

--
| James E.Thompson, P.E.                           |    mens     |
| Analog Innovations, Inc.                         |     et      |
| Analog/Mixed-Signal ASIC\'s and Discrete Systems  |    manus    |
| Phoenix, Arizona  85048    Skype: Contacts Only  |             |
| Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  |
| E-mail Icon at http://www.analog-innovations.com |    1962     |

 I\'ll keep my guns, freedom, and money. You can keep the change.
Reply to
Jim Thompson

I really didn't know how to fly until I started teaching it. That's sort of scary.

Jim

Reply to
RST Engineering (jw)

I have always contended that I could without any training.

Reply to
Archimedes' Lever

OK, I got it all to work ... with one minor problem. In Excel when you print, unless you check the "print the whole workbook" you have to print one page at a time, move to the next page, print that page, and so on. The macro simply sends the whole workbook whose pages have been "selected" to the printer one sheet at a time.

To a real printer that's not a problem. However, when printing to a file like a .pdf, you have to save one sheet at a time and then when all the sheets are printed one pdf file at a time, you can combine them in a single pdf. The saving one sheet at a time is nearly as time intensive as printing the whole thing to a .pdf and then manually deleting the zero sum sheets.

Is there a nice way in the macro to tell Excel to print the selected sheets as one file and not page at a time?

I am continuously amazed at how basic a student's mind is when it is so obvious to me because I've done it a few thousand times.

I got it. That was the missing link.

Reading is one thing. COmprehending quite a different matter. Thanks for your help.

Jim

Reply to
RST Engineering (jw)

Yes, it does, and that is what you wanted when you made your post. Your test to fill F52 based on whether the sheet has changed or whatever is how that selection gets made. The macro merely tests the value of that field, prints if true, and cycles through to the next sheet. You could run the test first, and then run the print job based on the test. Currently it: tests, prints, steps, repeats. You need it to: test, flag, print.

You make NO selection on printing from ANY menu one would use in excel.

The MACRO selects it, remember? The macro also flags which sheets to print based on the contents of the cell you fill. It merely does the print function after testing each sheet. You need to find a way to compile the print session into a single print job. You could 'print to file' each page, then use a batch file to pipe it to the printer directly, which would be a single print job from all observations.

In the macro, the current "print preview" mode my sheet is in will ALWAYS step trough each sheet. With it set to print it out, they should all fly without ANY user interaction. If your print dialog is coming up at all when the macro is set to actual print mode, a different print command is needed inside the macro. I will make a sheet that has two buttons so you can choose preview or print. You can use those buttons on your sheet. You paste the button as an image, and hyperlink the image to a function. Then, it is a button you can use to call the macro.

There is a way to modify the macro to highlight 'changed sheets' that have specific data in F52, then run a standard print call which would print those highlighted sheets all at once, instead of stepping through each sheet, then printing it, it would step through each sheet, highlighting it's tab, then calling the print job at the end.

You can also highlight ALL the worksheet tabs yourself using the shift or alt keys and mouse cursor. All highlighted sheets will print. You do not have to use the "print whole workbook" dialog at all.

Reply to
Archimedes' Lever

Wings either.

Reply to
krw

I taught a couple of CS courses at the local college (asked the Dean once if I taught all the courses did I get the degree - MAIT) and several at work, in the '80s. Putting together a course teaches a lot. Standing up and teaching and (answering the questions) really drives the subject home. After teaching for three hours I was pooped!

Reply to
krw

I'm teaching one theory and two tinbending classes next semester where the three campuses are about 150 miles apart. One on Monday, one on Tuesday, and one on Wednesday. I can do three hours of lecture without too much problem, but the Monday class is half lecture, half lab and the other two are all lab. Now LAB is what really poops you out.

Jim

Reply to
RST Engineering (jw)

I found the opposite. I could teach labs all day long. To me that was more or less like working the same time in the lab. Time flies...

The college courses were all taught at night after work, so the three hours on top of eight didn't help. When I taught internal classes it was usually during work hours, so the hours weren't longer. The internal courses were more fun; a much better class of student.

Reply to
krw

The original macro and the current macro are identical except for the cell called.

Reply to
Archimedes' Lever

The current sheet is always "highlighted" at the bottom where the sheet's tab is. You can highlight more than one at once, even though only one is visible. A subsequent print prints ALL highlighted sheets.

All we would have to do is step through the F52 test on each sheet, and instead of printing it, highlight it (the sheet tab), and after stepping through the entire sheet, perform the print operation.

That way it only makes one compiled printout that only needs one pdf.

Reply to
Archimedes' Lever

Baba Ram Das -- Be Here Now

Be Now Here

Here Be Now

Now Be Here

Here Now Be

Be Here Now

Now Here Be

I guess all it would take would be about 2000 mcg a day.

Reply to
Archimedes' Lever

=20

Not sure, but try an lparen "(" just after "if" and an rparen ")" just before "then" if you would.

If you want an excel NG please setup your newsreader to _also_ point directly at=20

news.microsoft.com=20

and pick up one there. It is read by many MS support staffers, MVPS, and other experts.

Reply to
JosephKK

Except that several posts have been made there already, of which none have been answered.

Reply to
Archimedes' Lever

I've seen nothing about this thread on microsoft.public.excel. Always very active.

RL

Reply to
legg

I posted to microsoft.public.excel.programming and microsoft.public.excel.worksheet.functions without getting a single response. However, Archimedes posted me code yesterday that works just like I want it to, although it wasn't the way I was thinking about it to start with.

I'd sort of like to take the code line by line and see if I can work my way through it to understand a little bit more than when I started. Here is the whole code and I'll annotate it with '* to indicate that it is MY annotation and not the author's. I'll do that over in the newsgroup microsoft.public.excel.programming. Thanks to all for the help.

--
"It is the mark of an educated mind to be able to entertain a thought 
without accepting it."
        --Aristotle


> I\'ve seen nothing about this thread on microsoft.public.excel. Always
> very active.
>
> RL
Reply to
RST Engineering (jw)

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.