+ Reply to Thread
Results 1 to 4 of 4

Save text of spreadsheet--without macros or data query

  1. #1
    Bryan Dickerson
    Guest

    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. #2
    Tom Ogilvy
    Guest

    Re: 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" <[email protected]> wrote in message
    news:OjySQ3M%[email protected]...
    > 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. #3
    Bryan Dickerson
    Guest

    Re: 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" <[email protected]> wrote in message
    news:uLJo5AN%[email protected]...
    > ' 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" <[email protected]> wrote in message
    > news:OjySQ3M%[email protected]...
    > > 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. #4
    Tom Ogilvy
    Guest

    Re: 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" <[email protected]> wrote in message
    news:OCIqZIO%[email protected]...
    > 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" <[email protected]> wrote in message
    > news:uLJo5AN%[email protected]...
    > > ' 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" <[email protected]> wrote in message
    > > news:OjySQ3M%[email protected]...
    > > > 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1