Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default VBA and SharePoint permissions

I have an excel workbook running macros on an in-house SharePoint site. Files
are CheckedOut, Edited and CheckedIn with a Macro if the user is allowed to
Edit data through their SharePoint permission settings. Other users are not
allowed to Edit data but they are allowed to View/Read-only the Workbook
data. For user convenience, I would like the same Macro to auto start
whenever a user Opens the Workbook (this I can do). However since different
users have different permissions under SharePoint (Edit data vs. View/Read
only) I would like to read the individual users SharePoint permission
setting within the macro code and then use this to determine flow within the
macro (Editors can run the entire macro and Modify/Save the data and Viewers
default to the current read-only Workbook). Can this be done €“ if so how. If
not can you suggest another way to do this. Only one user can CheckOut the
workbook for editing at a time but multiple users can Open the workbook for
viewing (at the same time). If a View/Read-only user tries to CheckOut a
Workbook it will generate an error but this will also happen if a user whose
permission setting allows them to Edit a Workbook tries to CheckOut a
Workbook that is already checked out by another user. At least that's my
understanding and I'm sticking to it unless you tell me otherwise.
Thank you for your time and expertise in advance

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default VBA and SharePoint permissions

What version of Excel are you using? I'm still working through some
sharepoint related issues, but you can use

http://msdn.microsoft.com/en-us/libr...ice.11%29.aspx

and

http://msdn.microsoft.com/en-us/libr...ice.11%29.aspx

I'm running into issues where I checkout a doc programmatically and then
discard the check out with

myWB.Checkin (False)

and it still keeps a version in my sharepoint drafts, so when I open the doc
again, it's got a version in the drafts already.

HTH,
Barb Reinhardt

"carmjo005" wrote:

I have an excel workbook running macros on an in-house SharePoint site. Files
are CheckedOut, Edited and CheckedIn with a Macro if the user is allowed to
Edit data through their SharePoint permission settings. Other users are not
allowed to Edit data but they are allowed to View/Read-only the Workbook
data. For user convenience, I would like the same Macro to auto start
whenever a user Opens the Workbook (this I can do). However since different
users have different permissions under SharePoint (Edit data vs. View/Read
only) I would like to read the individual users SharePoint permission
setting within the macro code and then use this to determine flow within the
macro (Editors can run the entire macro and Modify/Save the data and Viewers
default to the current read-only Workbook). Can this be done €“ if so how. If
not can you suggest another way to do this. Only one user can CheckOut the
workbook for editing at a time but multiple users can Open the workbook for
viewing (at the same time). If a View/Read-only user tries to CheckOut a
Workbook it will generate an error but this will also happen if a user whose
permission setting allows them to Edit a Workbook tries to CheckOut a
Workbook that is already checked out by another user. At least that's my
understanding and I'm sticking to it unless you tell me otherwise.
Thank you for your time and expertise in advance

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default VBA and SharePoint permissions

First of all, I apologize for my delayed response. Secondly, try as I may, I
was unable to accomplish what I was trying to do €“ the way I was trying to do
it. So, I found an alternative. Our SharePoint people convinced me to just
have two different Desktop icons, one taking users with Read-only SharePoint
permission to a read-only file (containing no macro) allowing them to view
current and previous daily workbooks. The other desktop icon takes users with
Edit SharePoint permission to a CheckOut and Edit file that contains the
macros. It runs well and eliminates the conflicts with checking-in and out
files along with letting SharePoint control user permissions.

Im using Excel 2003. Deleting a file from the Local SharePoint Draft folder
seems like it should be straight forward but isnt. Tried Kill
"Path\Filename.xls" with Filename Closed, no luck. I wonder if .RefreshAll or
..UpdateChanges may help with the €œissues€ you described. Good Luck.
Thanks


"Barb Reinhardt" wrote:

What version of Excel are you using? I'm still working through some
sharepoint related issues, but you can use

http://msdn.microsoft.com/en-us/libr...ice.11%29.aspx

and

http://msdn.microsoft.com/en-us/libr...ice.11%29.aspx

I'm running into issues where I checkout a doc programmatically and then
discard the check out with

myWB.Checkin (False)

and it still keeps a version in my sharepoint drafts, so when I open the doc
again, it's got a version in the drafts already.

HTH,
Barb Reinhardt

"carmjo005" wrote:

I have an excel workbook running macros on an in-house SharePoint site. Files
are CheckedOut, Edited and CheckedIn with a Macro if the user is allowed to
Edit data through their SharePoint permission settings. Other users are not
allowed to Edit data but they are allowed to View/Read-only the Workbook
data. For user convenience, I would like the same Macro to auto start
whenever a user Opens the Workbook (this I can do). However since different
users have different permissions under SharePoint (Edit data vs. View/Read
only) I would like to read the individual users SharePoint permission
setting within the macro code and then use this to determine flow within the
macro (Editors can run the entire macro and Modify/Save the data and Viewers
default to the current read-only Workbook). Can this be done €“ if so how. If
not can you suggest another way to do this. Only one user can CheckOut the
workbook for editing at a time but multiple users can Open the workbook for
viewing (at the same time). If a View/Read-only user tries to CheckOut a
Workbook it will generate an error but this will also happen if a user whose
permission setting allows them to Edit a Workbook tries to CheckOut a
Workbook that is already checked out by another user. At least that's my
understanding and I'm sticking to it unless you tell me otherwise.
Thank you for your time and expertise in advance

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default VBA and SharePoint permissions

Came across this "ActiveWorkbook.SharedWorkbookFile.Delete" if you haven't
already tried it.

"Barb Reinhardt" wrote:

What version of Excel are you using? I'm still working through some
sharepoint related issues, but you can use

http://msdn.microsoft.com/en-us/libr...ice.11%29.aspx

and

http://msdn.microsoft.com/en-us/libr...ice.11%29.aspx

I'm running into issues where I checkout a doc programmatically and then
discard the check out with

myWB.Checkin (False)

and it still keeps a version in my sharepoint drafts, so when I open the doc
again, it's got a version in the drafts already.

HTH,
Barb Reinhardt

"carmjo005" wrote:

I have an excel workbook running macros on an in-house SharePoint site. Files
are CheckedOut, Edited and CheckedIn with a Macro if the user is allowed to
Edit data through their SharePoint permission settings. Other users are not
allowed to Edit data but they are allowed to View/Read-only the Workbook
data. For user convenience, I would like the same Macro to auto start
whenever a user Opens the Workbook (this I can do). However since different
users have different permissions under SharePoint (Edit data vs. View/Read
only) I would like to read the individual users SharePoint permission
setting within the macro code and then use this to determine flow within the
macro (Editors can run the entire macro and Modify/Save the data and Viewers
default to the current read-only Workbook). Can this be done €“ if so how. If
not can you suggest another way to do this. Only one user can CheckOut the
workbook for editing at a time but multiple users can Open the workbook for
viewing (at the same time). If a View/Read-only user tries to CheckOut a
Workbook it will generate an error but this will also happen if a user whose
permission setting allows them to Edit a Workbook tries to CheckOut a
Workbook that is already checked out by another user. At least that's my
understanding and I'm sticking to it unless you tell me otherwise.
Thank you for your time and expertise in advance

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default VBA and SharePoint permissions

Sorry, last post should read "ActiveWorkbook.SharedWorkspaceFile.Delete"

"Barb Reinhardt" wrote:

What version of Excel are you using? I'm still working through some
sharepoint related issues, but you can use

http://msdn.microsoft.com/en-us/libr...ice.11%29.aspx

and

http://msdn.microsoft.com/en-us/libr...ice.11%29.aspx

I'm running into issues where I checkout a doc programmatically and then
discard the check out with

myWB.Checkin (False)

and it still keeps a version in my sharepoint drafts, so when I open the doc
again, it's got a version in the drafts already.

HTH,
Barb Reinhardt

"carmjo005" wrote:

I have an excel workbook running macros on an in-house SharePoint site. Files
are CheckedOut, Edited and CheckedIn with a Macro if the user is allowed to
Edit data through their SharePoint permission settings. Other users are not
allowed to Edit data but they are allowed to View/Read-only the Workbook
data. For user convenience, I would like the same Macro to auto start
whenever a user Opens the Workbook (this I can do). However since different
users have different permissions under SharePoint (Edit data vs. View/Read
only) I would like to read the individual users SharePoint permission
setting within the macro code and then use this to determine flow within the
macro (Editors can run the entire macro and Modify/Save the data and Viewers
default to the current read-only Workbook). Can this be done €“ if so how. If
not can you suggest another way to do this. Only one user can CheckOut the
workbook for editing at a time but multiple users can Open the workbook for
viewing (at the same time). If a View/Read-only user tries to CheckOut a
Workbook it will generate an error but this will also happen if a user whose
permission setting allows them to Edit a Workbook tries to CheckOut a
Workbook that is already checked out by another user. At least that's my
understanding and I'm sticking to it unless you tell me otherwise.
Thank you for your time and expertise in advance



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VBA and SharePoint permissions

On Aug 8, 11:01*pm, carmjo005
wrote:
Sorry, last post should read *"ActiveWorkbook.SharedWorkspaceFile.Delete"



"Barb Reinhardt" wrote:
What version of Excel are you using? * *I'm still working through some
sharepoint related issues, but you can use


http://msdn.microsoft.com/en-us/libr...ice.11%29.aspx


and


http://msdn.microsoft.com/en-us/libr...ice.11%29.aspx


I'm running into issues where I checkout a doc programmatically and then
discard the check out with


myWB.Checkin (False)


and it still keeps a version in my sharepoint drafts, so when I open the doc
again, it's got a version in the drafts already. *


HTH,
Barb Reinhardt


"carmjo005" wrote:


I have an excel workbook running macros on an in-house SharePoint site. Files
are CheckedOut, Edited and CheckedIn with a Macro if the user is allowed to
Edit data through their SharePoint permission settings. Other users are not
allowed to Edit data but they are allowed to View/Read-only the Workbook
data. *For user convenience, I would like the same Macro to auto start
whenever a user Opens the Workbook (this I can do). *However since different
users have different permissions under SharePoint (Edit data vs. View/Read
only) I would like to read the individual user’s SharePoint permission
setting within the macro code and then use this to determine flow within the
macro (Editors can run the entire macro and Modify/Save the data and Viewers
default to the current read-only Workbook). Can this be done – if so how. If
not can you suggest another way to do this. Only one user can CheckOut the
workbook for editing at a time but multiple users can Open the workbook for
viewing (at the same time). If a View/Read-only user tries to CheckOut a
Workbook it will generate an error but this will also happen if a user whose
permission setting allows them to Edit a Workbook tries to CheckOut a
Workbook that is already checked out by another user. At least that's my
understanding and I'm sticking to it unless you tell me otherwise.
Thank you for your time and expertise in advance- Hide quoted text -


- Show quoted text -


I can successfully checkout a file from VBA but it puts it in my draft
sharepoint folder, I don't see an option (like your get when you do it
manually) to have it NOT use the draft folder but keep it on the
server. Is there a way to do that?
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 to Use Permissions Kev - Radio Man Excel Discussion (Misc queries) 0 May 16th 09 09:10 AM
Sharepoint: How do I upload Excel (2003) Reports to Sharepoint? [email protected] Excel Programming 0 January 29th 09 11:34 AM
Excel links & SharePoint 3.0 (worked fine with SharePoint 2.0) ScottFisher2004 Excel Discussion (Misc queries) 0 November 10th 08 03:26 PM
Permissions Mike Busch[_2_] Excel Worksheet Functions 2 December 19th 07 02:59 PM
Permissions Paul Excel Worksheet Functions 0 November 23rd 06 10:58 AM


All times are GMT +1. The time now is 05:49 AM.

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

About Us

"It's about Microsoft Excel"