Try this:
If ActiveWorkbook.MultiUserEditing Then
           Application.DisplayAlerts = False
           ActiveWorkbook.ExclusiveAccess
           End If


Insert your code here

If Not ActiveWorkbook.MultiUserEditing Then
        Application.DisplayAlerts = False
        ActiveWorkbook.saveas ActiveWorkbook.Name, accessmode:=xlShared
        'Application.DisplayAlerts = True
        'MsgBox "Now Shared"
            End If




The trick worked for me....Hope it helps.



On Friday, August 29, 2014 7:45:23 PM UTC-4, Awal wrote:
>
> Try this:
>
> Enter code here... If ActiveWorkbook.MultiUserEditing Then
>            Application.DisplayAlerts = False
>            ActiveWorkbook.ExclusiveAccess
>            End If
>  
> YOUR CODE HERE
>
> Enter code here...If Not ActiveWorkbook.MultiUserEditing Then
>         Application.DisplayAlerts = False
>         ActiveWorkbook.saveas ActiveWorkbook.Name, accessmode:=xlShared
>         'Application.DisplayAlerts = True
>         'MsgBox "Now Shared"
>             End If
>
>
>
>
> On Wednesday, August 27, 2014 9:47:12 AM UTC-4, hilary lomotey wrote:
>>
>> its a lot of macro for different functions can it be done by your 
>> suggestion? 
>>
>>
>> On Wed, Aug 27, 2014 at 2:35 PM, Vaibhav Joshi <v...@vabs.in> wrote:
>>
>>> Hi
>>>
>>> Try converting macro to excel add-in & can install it to all user. I am 
>>> not sure but it might work.
>>>
>>> Cheers!!
>>>
>>>
>>> On Wed, Aug 27, 2014 at 6:57 PM, Hilary Lomotey <res...@gmail.com> 
>>> wrote:
>>>
>>>> Hello Experts,
>>>>
>>>> i have an excel templates where i want users to be able to access it 
>>>> almost at the smae time if the so wish so i activated the share workbook 
>>>> option on the review menu, however, its giving an error because the 
>>>> template contains macro and it says macros cannot be shared, pls is there 
>>>> a 
>>>> way around this where different users can access my file at the same time. 
>>>> thanks
>>>>  
>>>> -- 
>>>> Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? 
>>>> It’s =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ 
>>>> https://www.facebook.com/discussexcel
>>>>  
>>>> FORUM RULES
>>>>  
>>>> 1) Use concise, accurate thread titles. Poor thread titles, like Please 
>>>> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice 
>>>> will not get quick attention or may not be answered.
>>>> 2) Don't post a question in the thread of another member.
>>>> 3) Don't post questions regarding breaking or bypassing any security 
>>>> measure.
>>>> 4) Acknowledge the responses you receive, good or bad.
>>>> 5) Jobs posting is not allowed.
>>>> 6) Sharing copyrighted material and their links is not allowed.
>>>>  
>>>> NOTE : Don't ever post confidential data in a workbook. Forum owners 
>>>> and members are not responsible for any loss.
>>>> --- 
>>>> You received this message because you are subscribed to the Google 
>>>> Groups "MS EXCEL AND VBA MACROS" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>> an email to excel-macros...@googlegroups.com.
>>>> To post to this group, send email to excel-...@googlegroups.com.
>>>> Visit this group at http://groups.google.com/group/excel-macros.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>>  -- 
>>> Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? 
>>> It’s =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ 
>>> https://www.facebook.com/discussexcel
>>>  
>>> FORUM RULES
>>>  
>>> 1) Use concise, accurate thread titles. Poor thread titles, like Please 
>>> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice 
>>> will not get quick attention or may not be answered.
>>> 2) Don't post a question in the thread of another member.
>>> 3) Don't post questions regarding breaking or bypassing any security 
>>> measure.
>>> 4) Acknowledge the responses you receive, good or bad.
>>> 5) Jobs posting is not allowed.
>>> 6) Sharing copyrighted material and their links is not allowed.
>>>  
>>> NOTE : Don't ever post confidential data in a workbook. Forum owners and 
>>> members are not responsible for any loss.
>>> --- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "MS EXCEL AND VBA MACROS" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to excel-macros...@googlegroups.com.
>>> To post to this group, send email to excel-...@googlegroups.com.
>>> Visit this group at http://groups.google.com/group/excel-macros.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>

-- 
Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s 
=TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ 
https://www.facebook.com/discussexcel

FORUM RULES

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.
2) Don't post a question in the thread of another member.
3) Don't post questions regarding breaking or bypassing any security measure.
4) Acknowledge the responses you receive, good or bad.
5) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not allowed.

NOTE  : Don't ever post confidential data in a workbook. Forum owners and 
members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups "MS 
EXCEL AND VBA MACROS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to excel-macros+unsubscr...@googlegroups.com.
To post to this group, send email to excel-macros@googlegroups.com.
Visit this group at http://groups.google.com/group/excel-macros.
For more options, visit https://groups.google.com/d/optout.

Reply via email to