Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open file and get an excel sheet to print

Status
Not open for further replies.

rwweiland

Programmer
Oct 15, 2003
9
US
Hello,
I need to ba able to open a file, get an excel sheet from the file and print it. Is this possible in MS Access VBA? If so can someone please help me?
 
Try the following :

Dim xlWB
Set xlWB = GetObject("Path\FileName")
xlWB.Sheets("Sheet").PrintOut
Set xlWB = Nothing

replacing "Path\FileName" with the XL file full Path and "Sheet" with the name of the sheet you wish to print.

A.C.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top