Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / May 2006

Tip: Looking for answers? Try searching our database.

Newbie seeks suggestion on recording new macro to print sheets

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Vivian - 10 May 2006 05:21 GMT
Hi there, I want to click on a button (created from form), then the print  
window appear. I did the following steps:

created a button;
recorded new macro;
File --> Print, the print window appear, but at that time I can't stop
recording. So I clicked OK; a dialog pop up reminds me to save the file.
I saved the file, then the Microsoft Document Imaging appeared.
Then I stoped recording, assigned the macro, clicked the button, it asked to
save as first, and then the Microsoft Document Imaging appeared again.

What a messy, anybody could kindly tell me what's wrong with my work? How
could it be solved using the simplest "recording macro"  way.

Thanks for help.

Vivian
Peo Sjoblom - 10 May 2006 05:35 GMT
Open the file, press Alt + F11, if the macro does not show up in the main
window look for your workbook in the left project pane, double click module1
(I assume that is what you have) or press Alt + F8, select your macro and
click edit then use

Sub PrintOpen()
Application.Dialogs(xlDialogPrint).Show
End Sub

either high light all text you have and paste in the above or delete all
text except the top and bottom line and insert

Application.Dialogs(xlDialogPrint).Show

press Alt  + Q to close the editor and save the workbook

Signature

Regards,

Peo Sjoblom

Excel 95 - Excel 2007
Northwest Excel Solutions
www.nwexcelsolutions.com
"It is a good thing to follow the first law of holes;
if you are in one stop digging."  Lord Healey

> Hi there, I want to click on a button (created from form), then the print
> window appear. I did the following steps:
[quoted text clipped - 14 lines]
>
> Vivian
Vivian - 10 May 2006 06:53 GMT
Thank you Peo, it works. :) And it's soooo simple, I like it. But it can't be
done by just 'record new macro' and 'stop recording' ?

And I have another question, as what I have done to the macro, I got this:

Sub Macro1()
   Sheets("Data").Select
   ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
End Sub

Sounds like ok, if I config printer on my PC, will it work?

I appreciate your help very much.

> Open the file, press Alt + F11, if the macro does not show up in the main
> window look for your workbook in the left project pane, double click module1
[quoted text clipped - 30 lines]
> >
> > Vivian
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.