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 --gt; 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 quot;recording macroquot; way.
Thanks for help.
Vivian
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
--
Regards,
Peo Sjoblom
Excel 95 - Excel 2007
Northwest Excel Solutions
www.nwexcelsolutions.com
quot;It is a good thing to follow the first law of holes;
if you are in one stop digging.quot; Lord Healeyquot;Vivianquot; gt; wrote in message
...
gt; Hi there, I want to click on a button (created from form), then the print
gt; window appear. I did the following steps:
gt;
gt; created a button;
gt; recorded new macro;
gt; File --gt; Print, the print window appear, but at that time I can't stop
gt; recording. So I clicked OK; a dialog pop up reminds me to save the file.
gt; I saved the file, then the Microsoft Document Imaging appeared.
gt; Then I stoped recording, assigned the macro, clicked the button, it asked
gt; to
gt; save as first, and then the Microsoft Document Imaging appeared again.
gt;
gt; What a messy, anybody could kindly tell me what's wrong with my work? How
gt; could it be solved using the simplest quot;recording macroquot; way.
gt;
gt; Thanks for help.
gt;
gt; Vivian
gt;
gt;
gt;
gt;
gt;
gt;
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(quot;Dataquot;).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.
quot;Peo Sjoblomquot; wrote:
gt; Open the file, press Alt F11, if the macro does not show up in the main
gt; window look for your workbook in the left project pane, double click module1
gt; (I assume that is what you have) or press Alt F8, select your macro and
gt; click edit then use
gt;
gt; Sub PrintOpen()
gt; Application.Dialogs(xlDialogPrint).Show
gt; End Sub
gt;
gt; either high light all text you have and paste in the above or delete all
gt; text except the top and bottom line and insert
gt;
gt; Application.Dialogs(xlDialogPrint).Show
gt;
gt; press Alt Q to close the editor and save the workbook
gt;
gt; --
gt;
gt; Regards,
gt;
gt; Peo Sjoblom
gt;
gt; Excel 95 - Excel 2007
gt; Northwest Excel Solutions
gt; www.nwexcelsolutions.com
gt; quot;It is a good thing to follow the first law of holes;
gt; if you are in one stop digging.quot; Lord Healey
gt;
gt;
gt; quot;Vivianquot; gt; wrote in message
gt; ...
gt; gt; Hi there, I want to click on a button (created from form), then the print
gt; gt; window appear. I did the following steps:
gt; gt;
gt; gt; created a button;
gt; gt; recorded new macro;
gt; gt; File --gt; Print, the print window appear, but at that time I can't stop
gt; gt; recording. So I clicked OK; a dialog pop up reminds me to save the file.
gt; gt; I saved the file, then the Microsoft Document Imaging appeared.
gt; gt; Then I stoped recording, assigned the macro, clicked the button, it asked
gt; gt; to
gt; gt; save as first, and then the Microsoft Document Imaging appeared again.
gt; gt;
gt; gt; What a messy, anybody could kindly tell me what's wrong with my work? How
gt; gt; could it be solved using the simplest quot;recording macroquot; way.
gt; gt;
gt; gt; Thanks for help.
gt; gt;
gt; gt; Vivian
gt; gt;
gt; gt;
gt; gt;
gt; gt;
gt; gt;
gt; gt;
gt;
gt;
gt;
- Feb 22 Thu 2007 20:35
Newbie seeks suggestion on recording new macro to print sheets
close
全站熱搜
留言列表
發表留言