Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 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- 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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to Use Permissions | Excel Discussion (Misc queries) | |||
Sharepoint: How do I upload Excel (2003) Reports to Sharepoint? | Excel Programming | |||
Excel links & SharePoint 3.0 (worked fine with SharePoint 2.0) | Excel Discussion (Misc queries) | |||
Permissions | Excel Worksheet Functions | |||
Permissions | Excel Worksheet Functions |