User not logged in - login - register
Home Calendar Books School Tool Photo Gallery Message Boards Users Statistics Advertise Site Info
go to bottom | |
 Message Boards » » Printing with VBA Page [1]  
Wyloch
All American
4244 Posts
user info
edit post

Trying to print using VB 6.3 in Excel.

Despite the claims of common googled results, the following simple code does not work:

Printer.FontItalic = True
Printer.Print "test message"
Printer.EndDoc

I get an object required error. Anyone know how to do this?

11/12/2007 1:54:51 PM

LimpyNuts
All American
16859 Posts
user info
edit post

The "Printer" object doesn't exist in VBA. That's VB only. Create a document (Word, Excel, or other) using VBA and print it using the handling application (this can be called through VBA -- I'd figure it out for you, but my Office 2k3 installation is a little fucked right now and VBA isn't working)

[Edited on November 12, 2007 at 3:24 PM. Reason : ]

11/12/2007 3:22:12 PM

Wyloch
All American
4244 Posts
user info
edit post

Thanks. Will do.

11/12/2007 4:48:16 PM

 Message Boards » Tech Talk » Printing with VBA Page [1]  
go to top | |
Admin Options : move topic | lock topic

© 2024 by The Wolf Web - All Rights Reserved.
The material located at this site is not endorsed, sponsored or provided by or on behalf of North Carolina State University.
Powered by CrazyWeb v2.39 - our disclaimer.