Group:  Microsoft Excel ยป microsoft.public.excel.printing
Thread: Print Function in VB?

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

Print Function in VB?
Rizwan 01.11.2005 20:38:09
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?
Re: Print Function in VB?
"Paul B" <to_much_spam_to_list[ at ]nospam.com> 02.11.2005 00:05:34
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

--
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

"Rizwan" <Rizwan[ at ]discussions.microsoft.com> wrote in message
news:CC94CD0E-B1C1-4CAC-9C1D-BB8E49D525DD[ at ]microsoft.com...
[Quoted Text]
> 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?


Re: Print Function in VB?
Rizwan 02.11.2005 00:42:02
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...

"Paul B" wrote:

[Quoted Text]
> 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
>
> --
> 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
>
> "Rizwan" <Rizwan[ at ]discussions.microsoft.com> wrote in message
> news:CC94CD0E-B1C1-4CAC-9C1D-BB8E49D525DD[ at ]microsoft.com...
> > 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?
>
>
>
Re: Print Function in VB?
"Paul B" <to_much_spam_to_list[ at ]nospam.com> 02.11.2005 03:39:03
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?

--
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

"Rizwan" <Rizwan[ at ]discussions.microsoft.com> wrote in message
news:B5298C36-2F77-40C1-BFD3-04AA979EE8C0[ at ]microsoft.com...
[Quoted Text]
> 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...
>
> "Paul B" wrote:
>
> > 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
> >
> > --
> > 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
> >
> > "Rizwan" <Rizwan[ at ]discussions.microsoft.com> wrote in message
> > news:CC94CD0E-B1C1-4CAC-9C1D-BB8E49D525DD[ at ]microsoft.com...
> > > 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?
> >
> >
> >


Re: Print Function in VB?
Rizwan 02.11.2005 12:30:01
Yes, it worked. Thanks for the reply...

"Paul B" wrote:

[Quoted Text]
> 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?
>
> --
> 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
>
> "Rizwan" <Rizwan[ at ]discussions.microsoft.com> wrote in message
> news:B5298C36-2F77-40C1-BFD3-04AA979EE8C0[ at ]microsoft.com...
> > 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...
> >
> > "Paul B" wrote:
> >
> > > 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
> > >
> > > --
> > > 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
> > >
> > > "Rizwan" <Rizwan[ at ]discussions.microsoft.com> wrote in message
> > > news:CC94CD0E-B1C1-4CAC-9C1D-BB8E49D525DD[ at ]microsoft.com...
> > > > 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?
> > >
> > >
> > >
>
>
>

Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net