PC Review


Reply
Thread Tools Rate Thread

How can I share and un-share a workbook using a macro?

 
 
=?Utf-8?B?Qm90dGVy?=
Guest
Posts: n/a
 
      4th Oct 2006
I have a excel workbook that I create a barcode picture in and print it. The
information in this workbook is shared by many different users. When a
workbook is shared, pictures can not be created. I would like to unshare the
workbook, print the barcode, and the share again so that the other users can
see infomation created at this station. Can someone tell be how to share and
unshare in a macro?
 
Reply With Quote
 
 
 
 
Nigel
Guest
Posts: n/a
 
      4th Oct 2006
If ActiveWorkbook.MultiUserEditing Then
ActiveWorkbook.ExclusiveAccess
End If



If Not ActiveWorkbook.MultiUserEditing Then
ActiveWorkbook.SaveAs Filename:=ActiveWorkbook.FullName, _
accessMode:=xlShared
End If


--
Cheers
Nigel



"Botter" <(E-Mail Removed)> wrote in message
news:51D7CF0E-C7F6-4910-AAEA-(E-Mail Removed)...
>I have a excel workbook that I create a barcode picture in and print it.
>The
> information in this workbook is shared by many different users. When a
> workbook is shared, pictures can not be created. I would like to unshare
> the
> workbook, print the barcode, and the share again so that the other users
> can
> see infomation created at this station. Can someone tell be how to share
> and
> unshare in a macro?



 
Reply With Quote
 
=?Utf-8?B?VG9tIE9naWx2eQ==?=
Guest
Posts: n/a
 
      4th Oct 2006
With ActiveWorkbook
' .KeepChangeHistory = True ' optional
.SaveAs Filename:=.FullName, AccessMode:=xlShared
.Close
End With

or
If Not ActiveWorkbook.MultiUserEditing Then
ActiveWorkbook.SaveAs fileName:=ActiveWorkbook.FullName, _
accessMode:=xlShared
End If

-----------------------

If ActiveWorkbook.MultiUserEditing Then
ActiveWorkbook.ExclusiveAccess
End If


read the help on these methods.

--
Regards,
Tom Ogilvy



"Botter" wrote:

> I have a excel workbook that I create a barcode picture in and print it. The
> information in this workbook is shared by many different users. When a
> workbook is shared, pictures can not be created. I would like to unshare the
> workbook, print the barcode, and the share again so that the other users can
> see infomation created at this station. Can someone tell be how to share and
> unshare in a macro?

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Share a digitally-signed macro workbook alngtheway Microsoft Excel Programming 0 25th Dec 2008 11:48 AM
Re: Can I share a selfcert macro workbook with other network users Gord Dibben Microsoft Excel Misc 1 11th Dec 2006 10:56 PM
Can't share workbook. The "Share Workbook" option is off. Why? =?Utf-8?B?RG95bGUgRGllbmVy?= Microsoft Excel Misc 4 24th Apr 2006 06:56 PM
Can you share a personal macro workbook Lynneth Microsoft Excel Programming 2 5th Jan 2006 02:52 PM
how to share macro for different workbook... sokevin Microsoft Excel Misc 2 26th Feb 2004 01:56 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:13 PM.