Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using Macro to save form to file
I need to provide an easy way for an excel form to be saved with the data
(without sharing the entire workbook and the underlying formulas). I have figured out how to print the form; however, there is the need to distribute electronically. Think it need to be a macro - but I can't figure it out and how to also include header and footer.... |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using Macro to save form to file
Since you don't want to share the entire workbook, record a macro when you copy
the worksheets to a new workbook. Then for each sheet in that new workbook, select all the cells and copy|paste special values. I'd end up with something like: Option Explicit Sub testme() Dim newWkbk As Workbook Dim wks As Worksheet Worksheets(Array("sheet1", "sheet3", "sheet5")).Copy Set newWkbk = ActiveWorkbook For Each wks In newWkbk.Worksheets With wks.UsedRange .Copy .PasteSpecial Paste:=xlPasteValues End With Next wks End Sub DB wrote: I need to provide an easy way for an excel form to be saved with the data (without sharing the entire workbook and the underlying formulas). I have figured out how to print the form; however, there is the need to distribute electronically. Think it need to be a macro - but I can't figure it out and how to also include header and footer.... -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
2007 Macro to Open File, Delete Contents, Save New File | Excel Discussion (Misc queries) | |||
how can I save an excel file with long number columns in cvs form. | Excel Discussion (Misc queries) | |||
ASP: Open Excel File with Macro, Allow Macro to run, and then save | Excel Programming | |||
Macro to insert values from a file and save another sheet as a .txt file | Excel Programming | |||
Automate open file, update links, run macro, close and save file | Excel Programming |