Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How can I share and un-share a workbook using a macro?

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?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 923
Default How can I share and un-share a workbook using a macro?

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" wrote in message
...
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?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default How can I share and un-share a workbook using a macro?

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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
share workbook Hong Excel Discussion (Misc queries) 0 June 10th 08 02:40 PM
why can't i share my workbook Lanki Excel Worksheet Functions 0 July 18th 07 03:14 PM
Can I share a selfcert macro workbook with other network users KarenF Excel Discussion (Misc queries) 4 December 11th 06 11:22 PM
Can't share workbook. The "Share Workbook" option is off. Why? Doyle Diener Excel Discussion (Misc queries) 4 April 24th 06 06:56 PM
Can you share a personal macro workbook Lynneth Excel Programming 2 January 5th 06 02:52 PM


All times are GMT +1. The time now is 09:42 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"