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?
|