View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
BJ&theBear BJ&theBear is offline
external usenet poster
 
Posts: 27
Default Excel 2003 VBA problem - extracting and emailing worksheets

On May 25, 11:53*am, "Jim Cone" wrote:
Add another sheet to your workbook.
Name it something like HourWorkedexpenses_new. *Put your headings on it..
Send that sheet instead of HourWorkedexpenses...

With Sourcewb
*Set TheActiveWindow = ActiveWindow
*Set TempWindow = .NewWindow
.Sheets(Array("UserList", "HoursWorkedexpenses_new", "ProjectList", "CLSstageList", "Input")).Copy
End With

--
Jim Cone
Portland, Oregon *USAhttp://www.mediafire.com/PrimitiveSoftwarehttp://www.contextures.com/excel-sort-addin.html

"BJ&theBear"
wrote in ...
The macro/VBA coding below is an adaptation of Ron de Bruins macro for
extracting certain sheets from a workbook and creating another
workbook which is then emailed to an address from Outlook Contact list
or to specified addresses.

My problem is that one of the sheets I wish to email has many
thousands of entries and all I really need is a blank worksheet with
the correct columns and headings. *This worksheet will subsequently be
completed by employees and then emailed back to be imported back into
the main workbook. *The other worksheets need to retain all their
information as they are lists for a series of dropdown selection
lists.

I do not want to "blank" the worksheet before it is exported/copied to
the new sheet as there is a fear that if the macro crashes then all
data in the main workbook will be lost.

Can anyone advise how I can just export the sheet
"HoursWorkedexpenses" still as part of the array but with no
information other than the column headings.

I cannot get my head round this problem
Thanks for any advice
Brian
Scotland

-snip-


Jim

You are a gem??!!

I have been pondering how to do this for 24 hours and never thought
that something could be so simple.

I really have been having a bad blockage the last few days

Thanks once again for the time and effort

BJ