Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
' 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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Trying to save spreadsheet with macros??????? | Excel Discussion (Misc queries) | |||
How do I save data in shared spreadsheet? | Excel Worksheet Functions | |||
Save data retreived from query without saving query | Excel Discussion (Misc queries) | |||
How to save an excel spreadsheet as a text file without added quot | Excel Discussion (Misc queries) | |||
Macros that write data to a new spreadsheet? | Excel Programming |