ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to use VBA to set WB to Shared Status (https://www.excelbanter.com/excel-programming/422903-how-use-vba-set-wb-shared-status.html)

MikeZz

How to use VBA to set WB to Shared Status
 
Hi All,
I have a macro that builds a new file based on an Accounts Receivable data
file each week.

I'm wondering how I can set the workbook Share settings from within VBA?
Or do I have to manually do it each time I create a new workbook?

Thanks,
MikeZz

Conrad S

How to use VBA to set WB to Shared Status
 
Try this:

ActiveWorkbook.SaveAs "C:\shared.xls", , , , , , xlShared

--
Conrad S
#Don''t forget to click "Yes" if this post was helpful!#


"MikeZz" wrote:

Hi All,
I have a macro that builds a new file based on an Accounts Receivable data
file each week.

I'm wondering how I can set the workbook Share settings from within VBA?
Or do I have to manually do it each time I create a new workbook?

Thanks,
MikeZz


MikeZz

How to use VBA to set WB to Shared Status
 
Geeze that was easy.... I thought of looking in Help under save as....
Thought it would be a workbook property set some other way.

Thanks for the help,
MikeZz

"Conrad S" wrote:

Try this:

ActiveWorkbook.SaveAs "C:\shared.xls", , , , , , xlShared

--
Conrad S
#Don''t forget to click "Yes" if this post was helpful!#


"MikeZz" wrote:

Hi All,
I have a macro that builds a new file based on an Accounts Receivable data
file each week.

I'm wondering how I can set the workbook Share settings from within VBA?
Or do I have to manually do it each time I create a new workbook?

Thanks,
MikeZz


MikeZz

How to use VBA to set WB to Shared Status
 
Correction... I NEVER thought of looking in help under Save As...

"MikeZz" wrote:

Geeze that was easy.... I thought of looking in Help under save as....
Thought it would be a workbook property set some other way.

Thanks for the help,
MikeZz

"Conrad S" wrote:

Try this:

ActiveWorkbook.SaveAs "C:\shared.xls", , , , , , xlShared

--
Conrad S
#Don''t forget to click "Yes" if this post was helpful!#


"MikeZz" wrote:

Hi All,
I have a macro that builds a new file based on an Accounts Receivable data
file each week.

I'm wondering how I can set the workbook Share settings from within VBA?
Or do I have to manually do it each time I create a new workbook?

Thanks,
MikeZz



All times are GMT +1. The time now is 05:32 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com