Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Automated Print in Macro?
to print the sheet, just add
Activesheet.Print I don't understand what you mean by "when the macro is saved" Patrick Molloy Microsoft Excel MVP -----Original Message----- Below is listed a Macro that I use to run the following Macro. I would like the worksheet, (TEMPS) to automatically print when the Macro is saved. Thanks for looking at my issue... Krefty Option Explicit Sub Macro11() Dim destCell As Range Dim weatherWkbk As Workbook With Workbooks("DegreeDays.XLS").Worksheets ("Weather") .UsedRange.Clear Set destCell = .Cells(.Rows.Count, "A").End (xlUp).Offset(1, 0) End With Workbooks.OpenText Filename:="G:\Gas_Control\EXCEL\DEPT\Month Reports\weather.xls", _ Origin:=xlWindows, _ StartRow:=1, DataType:=xlFixedWidth, _ FieldInfo:=Array(Array(0, 1), Array(8, 1), _ Array(30, 1), Array(41, 1), Array(67, 1), Array (78, 1)) Set weatherWkbk = ActiveWorkbook ActiveSheet.UsedRange.Copy _ Destination:=destCell weatherWkbk.Close savechanges:=False Application.Goto destCell, Scroll:=True ActiveSheet.UsedRange.Columns.AutoFit End Sub . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
print button macro & specific tabs to print | Excel Worksheet Functions | |||
Setting up automated print function in VB | Excel Discussion (Misc queries) | |||
Pivot Table macro to set print area and print details of drill down data | Excel Discussion (Misc queries) | |||
Macro to open print window and set to print entire workbook | Excel Discussion (Misc queries) | |||
Create a print macro that would automatically select print area? | Excel Worksheet Functions |