Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with making workbook "shared"

Status
Not open for further replies.

mdb4444

MIS
Oct 27, 2009
1
US
I am stumped with an issue. Thanks in advance for any helpful replies.

Using OLE from a peoplesoft application I am trying to open up excel, edit the document and save it as a shared workbook. Everything works fine until I add any paramater other than the filename to the "saveas" command.

For example this works without any problem

&oWorkApp.ActiveWorkbook.SaveAs("c:\temp\file.xls");

As soon as I add another parameter like below
&oWorkApp.ActiveWorkbook.SaveAs("c:\temp\file.xls",xlworkbooknormal);
I get an error "OLE Automation error in _Workbook.SaveAs: ObjectDoMethod: Unable to get the SaveAs property of the Workbook class. "


The end result is I want to be able to make the workbook shared so will glady consider other options to achieve that result.

Thanks Again
 


hi,
Code:
Sub Save_SHARED()
    Application.DisplayAlerts = False
    ThisWorkbook.SaveAs Filename:=ThisWorkbook.FullName, AccessMode:=xlShared
    Application.DisplayAlerts = True
End Sub

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top