ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Problem updating via macro (https://www.excelbanter.com/excel-programming/368857-problem-updating-via-macro.html)

Erik[_10_]

Problem updating via macro
 
Hi,

I have a macro that functioned fine in Excel 2000 but somehow is
different in 2003.
Now when trying to open the file to be updated is opened Read-Only and
subsequently cannot save automatically. When opening the workbook
manually it just opens.
Any clues would be greatly appreciated.

Thanks, Erik

Top part of the vba:
Sub Auto_open()
'
' Auto_open Macro
'
'
Application.DisplayAlerts = False


Workbooks.Open Filename:="\\NLxx\BI Office reports\040\COM\Sales
statistics IND.xls"
Sheets("Detailed").Select
ActiveSheet.PivotTables("PivotTable1").RefreshTabl e
ActiveWorkbook.Save
ActiveWindow.Close


Tom Ogilvy

Problem updating via macro
 
You can try being more explict - although I don't know if that will help:

Workbooks.Open Filename:="\\NLxx\BI Office reports\040\COM\Sales
statistics IND.xls", ReadOnly:=False

--
Regards,
Tom Ogilvy



"Erik" wrote:

Hi,

I have a macro that functioned fine in Excel 2000 but somehow is
different in 2003.
Now when trying to open the file to be updated is opened Read-Only and
subsequently cannot save automatically. When opening the workbook
manually it just opens.
Any clues would be greatly appreciated.

Thanks, Erik

Top part of the vba:
Sub Auto_open()
'
' Auto_open Macro
'
'
Application.DisplayAlerts = False


Workbooks.Open Filename:="\\NLxx\BI Office reports\040\COM\Sales
statistics IND.xls"
Sheets("Detailed").Select
ActiveSheet.PivotTables("PivotTable1").RefreshTabl e
ActiveWorkbook.Save
ActiveWindow.Close



Erik[_10_]

Problem updating via macro
 
Thanks Tom but I tried this allready, no change whatsoever. :-(

Tom Ogilvy wrote:
You can try being more explict - although I don't know if that will help:

Workbooks.Open Filename:="\\NLxx\BI Office reports\040\COM\Sales
statistics IND.xls", ReadOnly:=False

--
Regards,
Tom Ogilvy



Erik[_10_]

Problem updating via macro
 
Got it.. There was a share on top that apparantly in win2003 are
read-only by default.
Erik

Hi,

I have a macro that functioned fine in Excel 2000 but somehow is
different in 2003.
Now when trying to open the file to be updated is opened Read-Only and
subsequently cannot save automatically. When opening the workbook
manually it just opens.
Any clues would be greatly appreciated.

Thanks, Erik

Top part of the vba:
Sub Auto_open()
'
' Auto_open Macro
'
'
Application.DisplayAlerts = False


Workbooks.Open Filename:="\\NLxx\BI Office reports\040\COM\Sales
statistics IND.xls"
Sheets("Detailed").Select
ActiveSheet.PivotTables("PivotTable1").RefreshTabl e
ActiveWorkbook.Save
ActiveWindow.Close




All times are GMT +1. The time now is 03:37 AM.

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