malik641
04-24-2007, 03:01 PM
Hey guys,
Does anybody have any experience with shared workbooks? I'm developing an application that everyone at my job can view, but only 3 people can edit the data inside. There is a lot of protection and I do have a bunch of VBA code inside. FYI, the code works fine with Worksheet protection and workbook protection. The workbook contains hyperlinks to other files and a lot of my code works with these. Once I share and protect the workbook all the hyperlinks get destroyed. Now, I have a button to repair / create hyperlinks, but they cannot be changed once a workbook has been "shared" (per the help docs...plus, I've tried).
I can't just programmatically unshare and re-share the workbook because when you unshare (and unprotect) the workbook it then saves itself, and that would (probably) interrupt the code. Not to mention it wouldn't be a good idea to do that in the first place because what happens if 2 people are using the workbook when I programmatically unshare and re-share it? So that idea's out.
Another idea is that I could modify all the code to function as if it's reading hyperlinks on the worksheet when there really are none (because I would just have them removed because what's the point of having the hyperlinks if they're destroyed?). But I was just curious to know if anyone has a reason the hyperlinks are destroyed. And by destroyed, I mean:
Good hyperlink:
\\Ntserver2\controlled doc's (released)\Drawings\Pending Drawings\7-Basic\7-8F00L0LZN-xx.cdr
Bad Hyperlink:
../../../controlled%20doc's%20(released)/Drawings/Pending%20Drawings/7-Basic/7-8F00L0LZN-xx.cdr
TIA
Does anybody have any experience with shared workbooks? I'm developing an application that everyone at my job can view, but only 3 people can edit the data inside. There is a lot of protection and I do have a bunch of VBA code inside. FYI, the code works fine with Worksheet protection and workbook protection. The workbook contains hyperlinks to other files and a lot of my code works with these. Once I share and protect the workbook all the hyperlinks get destroyed. Now, I have a button to repair / create hyperlinks, but they cannot be changed once a workbook has been "shared" (per the help docs...plus, I've tried).
I can't just programmatically unshare and re-share the workbook because when you unshare (and unprotect) the workbook it then saves itself, and that would (probably) interrupt the code. Not to mention it wouldn't be a good idea to do that in the first place because what happens if 2 people are using the workbook when I programmatically unshare and re-share it? So that idea's out.
Another idea is that I could modify all the code to function as if it's reading hyperlinks on the worksheet when there really are none (because I would just have them removed because what's the point of having the hyperlinks if they're destroyed?). But I was just curious to know if anyone has a reason the hyperlinks are destroyed. And by destroyed, I mean:
Good hyperlink:
\\Ntserver2\controlled doc's (released)\Drawings\Pending Drawings\7-Basic\7-8F00L0LZN-xx.cdr
Bad Hyperlink:
../../../controlled%20doc's%20(released)/Drawings/Pending%20Drawings/7-Basic/7-8F00L0LZN-xx.cdr
TIA