Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
q; Writing to files
I have an excel file I create a pivotal table and print each group to separate paper. I need to write a macro to save each group to a separate file. Can anybody write me a macro to do this? |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
q; Writing to files
hi,
here is a "save range" macro i wrote for myself some time back. you may have to play with it. you have to select the range(group) to save. Sub mac1SaveRange() 'Macro written by FSt1 4/27/03 Dim cnt As Long Dim cell As Range On Error GoTo err1 MsgBox "You have selected range" & Selection.Address If Selection.Cells.Count = 1 Then If MsgBox("You have selected only one cell. Continue?????", vbYesNo, "Warning") = vbNo Then Exit Sub End If End If cnt = 0 For Each cell In Selection If Not IsEmpty(cell) Then cnt = cnt + 1 End If Next If cnt = 0 Then If MsgBox("There is no data in the selected range. Continue?!?!?!?!?", vbYesNo, "Warning") = vbNo Then Exit Sub End If End If Selection.Copy Workbooks.Add Range("A1").PasteSpecial xlPasteAll Application.Dialogs(xlDialogSaveAs).Show err1: MsgBox ("Need a range to save.") MsgBox("Idiot!") Exit Sub End Sub regards FSt1 "JIM.H." wrote: I have an excel file I create a pivotal table and print each group to separate paper. I need to write a macro to save each group to a separate file. Can anybody write me a macro to do this? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Writing to csv | Excel Discussion (Misc queries) | |||
Sum not including writing | New Users to Excel | |||
Writing a Marco | Excel Worksheet Functions | |||
Writing a formula | Excel Discussion (Misc queries) | |||
Need Help Writing a Formula | Excel Worksheet Functions |