Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Programmatically remove sharing?

I suppose you can use "Application.Username" to indentify who is working on the file and write the macro according to your specific security needs.

"MDW" wrote:

Hey all,

I've got some VBA code that loops through a folder of Excel files and compiles their data into one sheet. When we give the books to the users, the sheets are protected to help control their data input. As I run my code, I use the .Unprotect method of the worksheet to go through and remove the protection so I can manipulate their stuff.

However, one of my users has shared his workbook, and for some reason this screws up the .Unprotect method. It throws an error - "Unprotect method of Class 'Worksheet' failed."

I know that I can go in and manually remove the sharing from the sheet. However, is there some way I can detect this in the future, and remove the sharing if needed? I tried Workbook.UnprotectSharing and that didn't seem to do anything.

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
How do I remove protection and sharing from an Excel workbook? Janice Excel Discussion (Misc queries) 1 November 3rd 05 05:51 PM
Adding to AutoComplete programmatically Jim McLeod Excel Programming 3 April 19th 04 05:29 PM
Programmatically Add Reference` keepitcool Excel Programming 1 September 16th 03 05:30 PM
Programmatically Add Reference` Jean-Paul Viel Excel Programming 0 September 16th 03 02:23 PM
Can i set a reference programmatically? Tom Ogilvy Excel Programming 1 August 19th 03 04:24 PM


All times are GMT +1. The time now is 03:19 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"