![]() |
Print Macros
I'm trying to create a button that will automatically print out a sheet to my
desktop (or possibly another folder) with a specific filename (say, Vendor A) without having to type anything in... Basically press a button and my file is ready to go without any intervention... any help out there? |
Print Macros
You want to "print out a sheet to my desktop" ?
As a PDF or which format ? Or do mean save as an Excel file ? NickHK "WBTKbeezy" ... I'm trying to create a button that will automatically print out a sheet to my desktop (or possibly another folder) with a specific filename (say, Vendor A) without having to type anything in... Basically press a button and my file is ready to go without any intervention... any help out there? |
Print Macros
I do mean a PDF actually.
"News" wrote: You want to "print out a sheet to my desktop" ? As a PDF or which format ? Or do mean save as an Excel file ? NickHK "WBTKbeezy" ... I'm trying to create a button that will automatically print out a sheet to my desktop (or possibly another folder) with a specific filename (say, Vendor A) without having to type anything in... Basically press a button and my file is ready to go without any intervention... any help out there? |
Print Macros
Sub CommandButton1()
Dim objShell as Object, objFolder as Object Dim strDeskPath as String Const Desktop = &H10& Set objShell = CreateObject("Shell.Application") Set objFolder = objShell.Namespace(Desktop) strDeskPath = objFolder.Self.Path worksheets("Sheet3").copy Application.DisplayAlerts = False activeworkbook.SaveAs strDeskPath & "\" & "Mybooks.xls" Activeworkbook.Close SaveChanges:=False end sub -- Regards, Tom Ogilvy "WBTKbeezy" wrote: I'm trying to create a button that will automatically print out a sheet to my desktop (or possibly another folder) with a specific filename (say, Vendor A) without having to type anything in... Basically press a button and my file is ready to go without any intervention... any help out there? |
All times are GMT +1. The time now is 04:58 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com