Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 42
Default Save text of spreadsheet--without macros or data query

I have a spreadsheet that I have built for a user and she wishes to be able
to send the spreadsheet, which is the result of an SQL stored procedure and
which also has some VBA for her in it, without all the query or VBA stuff
via email or some such. So my first question is: how do I programmatically
save the spreadsheet without the "extras" for her so that the user will not
see anything but numbers? I figure I can get the email part, but if someone
could suggest something on the save part, that would be really cool!!

TIA!


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Save text of spreadsheet--without macros or data query

' Create a copy of the sheet in a new workbook
ActiveSheet.copy
Activesheet.Cells.Copy
ActiveSheet.Cells.PasteSpecial xlValues
activeWorkbook.Send . . .
ActiveWorkbook.Close SaveChanges:=False


--
Regards,
Tom Ogilvy


"Bryan Dickerson" wrote in message
...
I have a spreadsheet that I have built for a user and she wishes to be

able
to send the spreadsheet, which is the result of an SQL stored procedure

and
which also has some VBA for her in it, without all the query or VBA stuff
via email or some such. So my first question is: how do I

programmatically
save the spreadsheet without the "extras" for her so that the user will

not
see anything but numbers? I figure I can get the email part, but if

someone
could suggest something on the save part, that would be really cool!!

TIA!




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 42
Default Save text of spreadsheet--without macros or data query

Maybe I'm not thinking or maybe you were just giving me the highlights of
what would be needed or maybe both, but wouldn't

ActiveSheet.Cells.Copy , then
ActiveSheet.Cells.PasteSpecial xlValues

.... just copy and paste the cells on top of themselves?


"Tom Ogilvy" wrote in message
...
' Create a copy of the sheet in a new workbook
ActiveSheet.copy
Activesheet.Cells.Copy
ActiveSheet.Cells.PasteSpecial xlValues
activeWorkbook.Send . . .
ActiveWorkbook.Close SaveChanges:=False


--
Regards,
Tom Ogilvy


"Bryan Dickerson" wrote in message
...
I have a spreadsheet that I have built for a user and she wishes to be

able
to send the spreadsheet, which is the result of an SQL stored procedure

and
which also has some VBA for her in it, without all the query or VBA

stuff
via email or some such. So my first question is: how do I

programmatically
save the spreadsheet without the "extras" for her so that the user will

not
see anything but numbers? I figure I can get the email part, but if

someone
could suggest something on the save part, that would be really cool!!

TIA!






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Save text of spreadsheet--without macros or data query

Yes - but that is the part that would answer the part about

So my first question is: how do I programmatically
save the spreadsheet without the "extras" for her so that the user will not
see anything but numbers?


That should leave nothing but numbers on the sheet (removes formulas, links,
pivot tables, query tables.) However, we haven't addressed thinks like code
in the sheet module or buttons or other objects on the sheet. You really
didn't add any information about what the "extras" are that you want to
eliminate. The "query" could possibly be a vba procedure, a pivot table, a
querytable. So I gave a generalized approach, but specific code would be
needed for some specific items. Copying just the sheet to a new workbook
should eliminate any code except code in the sheet module (if there is code
in the sheet module then see Chip Pearson's page
http://www.cpearson.com/excel/vbe.htm )

--
Regards,
Tom Ogilvy




"Bryan Dickerson" wrote in message
...
Maybe I'm not thinking or maybe you were just giving me the highlights of
what would be needed or maybe both, but wouldn't

ActiveSheet.Cells.Copy , then
ActiveSheet.Cells.PasteSpecial xlValues

... just copy and paste the cells on top of themselves?


"Tom Ogilvy" wrote in message
...
' Create a copy of the sheet in a new workbook
ActiveSheet.copy
Activesheet.Cells.Copy
ActiveSheet.Cells.PasteSpecial xlValues
activeWorkbook.Send . . .
ActiveWorkbook.Close SaveChanges:=False


--
Regards,
Tom Ogilvy


"Bryan Dickerson" wrote in message
...
I have a spreadsheet that I have built for a user and she wishes to be

able
to send the spreadsheet, which is the result of an SQL stored

procedure
and
which also has some VBA for her in it, without all the query or VBA

stuff
via email or some such. So my first question is: how do I

programmatically
save the spreadsheet without the "extras" for her so that the user

will
not
see anything but numbers? I figure I can get the email part, but if

someone
could suggest something on the save part, that would be really cool!!

TIA!








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
Trying to save spreadsheet with macros??????? Buggsthecat1 Excel Discussion (Misc queries) 0 May 12th 10 03:11 PM
How do I save data in shared spreadsheet? Teresa Excel Worksheet Functions 2 December 8th 09 02:44 PM
Save data retreived from query without saving query Anthony Excel Discussion (Misc queries) 0 January 25th 06 07:17 PM
How to save an excel spreadsheet as a text file without added quot Dozzle Excel Discussion (Misc queries) 2 April 11th 05 04:21 PM
Macros that write data to a new spreadsheet? StargateFanFromWork Excel Programming 3 June 24th 04 04:08 PM


All times are GMT +1. The time now is 10:32 AM.

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

About Us

"It's about Microsoft Excel"