Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Very visual basic

Hello and good morning to all,

i have a bit of a VB question to ask, does anyone know if
there is any code that could be used on a button so it
prints the current window to a printer??

Thank you,

Robert Couchman
)
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Very visual basic

Hi Robert
why don't you use the toolbar print button for this :-)

--
Regards
Frank Kabel
Frankfurt, Germany

Robert Couchman wrote:
Hello and good morning to all,

i have a bit of a VB question to ask, does anyone know if
there is any code that could be used on a button so it
prints the current window to a printer??

Thank you,

Robert Couchman
)

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Very visual basic

What do you mean by the current window. Printout can print an object such as
the activesheet.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Robert Couchman" wrote in message
...
Hello and good morning to all,

i have a bit of a VB question to ask, does anyone know if
there is any code that could be used on a button so it
prints the current window to a printer??

Thank you,

Robert Couchman
)



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Very visual basic

Of course i would use the toolbar....

if i had a toolbar on the form! :-)

any more ideas?? there all welcome!

Thank you,

Robert Couchman
)
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Very visual basic

By current window, i mean the Form/Window that is in use!

i have a form that displays all my stats for the program,
what i would like is for a button (print) to print the
form for the user.

i know you can print the form in VB but this does not
contain the data, as this is inserted when i run the
program.

thank you,

Robert Couchman
)


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Very visual basic

Hi
try something like
worksheets("worksheetname").printout

--
Regards
Frank Kabel
Frankfurt, Germany

Robert Couchman wrote:
Of course i would use the toolbar....

if i had a toolbar on the form! :-)

any more ideas?? there all welcome!

Thank you,

Robert Couchman
)

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Very visual basic

Thank you Fran,

but im afraid its not a worksheet im trying to print!

its a form!

a userform!

although i might try "userformname".printout

doubt it working!

i will be back!

thank you,

Robert Couchman
)
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Very visual basic **FIANL POST**

Good news!!!

finaly found the answer...

"userformname".printform

thank you for all the help!

Robert Couchman
)
  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Very visual basic **FIANL POST**

There wouldn't be any quotes around the name

userform1.printform

--
Regards,
Tom Ogilvy

"Robert Couchman" wrote in message
...
Good news!!!

finaly found the answer...

"userformname".printform

thank you for all the help!

Robert Couchman
)



  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Very visual basic **FIANL POST**

i know but i was refering to the name of the userform!

but thanks for that anyway.

Robert Couchman
)


  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Very visual basic **FIANL POST**

So was I, no quotes.

--
Regards,
Tom Ogilvy

"Robert Couchman" wrote in message
...
i know but i was refering to the name of the userform!

but thanks for that anyway.

Robert Couchman
)



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Visual Basic cil Excel Discussion (Misc queries) 3 January 11th 10 04:27 AM
Is Visual Basic the same as Visual Studio 2008? Mike Stewart Excel Worksheet Functions 5 January 11th 09 04:58 PM
Visual Basic and SP2 JessJ Excel Discussion (Misc queries) 2 October 6th 05 12:17 PM
changing the visual basic in office 2003 to visual studio net bigdaddy3 Excel Discussion (Misc queries) 1 September 13th 05 10:57 AM
Help with Visual Basic RK[_3_] Excel Programming 1 February 21st 04 04:50 PM


All times are GMT +1. The time now is 04:27 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"