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 / Printing / November 2005

Tip: Looking for answers? Try searching our database.

Print Function in VB?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rizwan - 01 Nov 2005 21:38 GMT
I just need to know, if I create a button in excel sheet, what forumla I have
to put in VB for it to print?
Paul B - 02 Nov 2005 01:05 GMT
Rizwan, do you want the button to print out? If so if its from the control
tool box it will print by default, if it is from the forms toolbar right
click on it, format control, properties, check print object. If you need
code to print the sheet, or workbook record a macro when you print and use
the button to run the code. If you need any more help post back with more
details

Signature

Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

> I just need to know, if I create a button in excel sheet, what forumla I have
> to put in VB for it to print?
Rizwan - 02 Nov 2005 01:42 GMT
Thanks Paul. What I am looking for is the code I will put in Macro, I beleive
there is a function, what is it?

Thanks for the reply...

> Rizwan, do you want the button to print out? If so if its from the control
> tool box it will print by default, if it is from the forms toolbar right
[quoted text clipped - 6 lines]
> have
> > to put in VB for it to print?
Paul B - 02 Nov 2005 04:39 GMT
Rizwan, I am not sure what you what,

This will set button 1 from the forms toolbar to print

   ActiveSheet.Shapes("Button 1").Select
   With Selection
       .PrintObject = True
   End With

This will print the sheet

ActiveSheet.PrintOut Copies:=1, Collate:=False

Is this what you need?

Signature

Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

> Thanks Paul. What I am looking for is the code I will put in Macro, I beleive
> there is a function, what is it?
[quoted text clipped - 11 lines]
> > have
> > > to put in VB for it to print?
Rizwan - 02 Nov 2005 13:30 GMT
Yes, it worked. Thanks for the reply...

> Rizwan, I am not sure what you what,
>
[quoted text clipped - 31 lines]
> > > have
> > > > to put in VB for it to print?
 
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.