+ Reply to Thread
Results 1 to 6 of 6

Preventing Users from Sending Workbook or Clearing Data Before Send

  1. #1
    Registered User
    Join Date
    08-16-2011
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    5

    Preventing Users from Sending Workbook or Clearing Data Before Send

    Have an unusual problem that I have not been able to find a solution for and was hoping someone here might have an idea.

    We have a spreadsheet which accesses confidential data from our HR system and then displays information regarding employees salary and calculations of potential redundancy pay offs they would be entitled to. Until recently, this was only used internally by the HR community however the business have decided to roll this out so that employees can access their own information via a workbook published on the sharepoint site for their Organisational Change Programme.

    This has now been adapted to use the network credentials of the user to display only their own information and is working fine. The only issue remaining is that should an employee email this spreadsheet to a colleague, their information will have already been populated on open and is therefore visible to everyone who opens that workbook until they enable macros.

    We have tried to look into disabling the send option in the Office Menu with no success and now are hoping that someone infinitely wiser has a solution which would help us to maintain privacy whether that be by clearing the data out before sending (another option we've tried but failed at) or somehow disabling the send options.

    Thanks in advance for your help.
    Last edited by stevchard; 08-17-2011 at 07:23 AM. Reason: Solved

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,428

    Re: Preventing Users from Sending Workbook or Clearing Data Before Send

    Generally, I think the approach to take in situations where it is essential for macros to be enabled is to have a "banner sheet" and hide all other sheets (xlSheetVeryHidden). The banner sheet can carry logos and instructions, whatever, and the key message that macros must be enabled to use the workbook. When the macros *are* enabled, they can initialise the other sheets and make them visible ... based on whatever criteria you specify, for example the User ID; at the same time, you'd hide the banner sheet. You would then use the Workbook Before Close Event to hide the visible sheets and unhide the banner sheet. You could even reset the sheets before you hide them so nothing "useful" will be forwarded.

    You'd need to protect the VBA Project with a password so that it is not possible to see the workbook structure ... but that's less of an issue if you reset before closing the workbook.

    Hope that helps as a suggested approach.

    Regards
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    08-16-2011
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Preventing Users from Sending Workbook or Clearing Data Before Send

    Thanks for your reply TMShucks.

    Unfortunately I had considered a banner sheet however that doesn't help us in the situation of an employee using the send function within outlook as this will bypass any code I place into BeforeSave/Close events and the Open event will not run until macros are enabled.

    Thanks also for your other security tips, they are all in place, including protecting the workbook structure to stop someone using personal macros to access the data.

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,428

    Re: Preventing Users from Sending Workbook or Clearing Data Before Send

    OK, as it's Excel 2003:

    Please Login or Register  to view this content.

    Please Login or Register  to view this content.

    To limit the scope and add to the confusion, call these modules from the Workbook Open, Activate and Deactivate events:

    Please Login or Register  to view this content.

    As I suggested previously, the VBA Project must be password protected to avoid circumvention.


    Regards

  5. #5
    Registered User
    Join Date
    08-16-2011
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Preventing Users from Sending Workbook or Clearing Data Before Send

    Thanks for that, we've come up with the solution of completely hiding the ribbon using the following code to hide the ribbon on open and restore it on close or save (at which point all personal data is stripped out)

    Please Login or Register  to view this content.

    Once again thanks for your help.

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,428

    Re: Preventing Users from Sending Workbook or Clearing Data Before Send

    Ah, OK ... I could have sworn your profile said 2003, hence the proposed solution.

    Nevertheless, you have your solution. Thanks for the rep anyway.

    Regards

+ 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