Overwrite Open Excel files on Macro

I

instereo911

Good morning,

I have a macro that goes out to an excel document on a Windows Sharepoint
site and updates a bunch of cells then after updating it is supposed to save.

The problem is if someone has the document open, i can save it. It gives me
an error. Is there a way of telling the macro... "No matter if someone has it
open, update the cells and save the document"

Here is part of the code

Workbooks.Open "http://Sharepoint.auth.testing/Host.xls"
Sheets("Detail").Select
Application.Goto Reference:="Query_from_MS_Access_Database"
Selection.QueryTable.Refresh BackgroundQuery:=False
Sheets("West Host Inventory Total").Select
Range("A1").Select
ActiveWorkbook.SaveAs Filename:= _
"http://Sharepoint.auth.testing/Host.xls" _
, FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
ActiveWindow.Close

Thanks everyone... and hopefully ou can help me fix this junk of a problem :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top