Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
DB DB is offline
external usenet poster
 
Posts: 46
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,758
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
2007 Macro to Open File, Delete Contents, Save New File Flintstone[_2_] Excel Discussion (Misc queries) 2 February 1st 10 11:25 PM
how can I save an excel file with long number columns in cvs form. layman2003 Excel Discussion (Misc queries) 3 October 2nd 08 10:17 PM
ASP: Open Excel File with Macro, Allow Macro to run, and then save delgados129 Excel Programming 0 March 10th 05 09:35 PM
Macro to insert values from a file and save another sheet as a .txt file Frank[_16_] Excel Programming 2 August 28th 03 01:07 AM
Automate open file, update links, run macro, close and save file Geoff[_7_] Excel Programming 2 August 26th 03 10:13 PM


All times are GMT +1. The time now is 05:02 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"