+ Reply to Thread
Results 1 to 6 of 6

Problem updating via macro

  1. #1
    Erik
    Guest

    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").RefreshTable
    ActiveWorkbook.Save
    ActiveWindow.Close


  2. #2
    Tom Ogilvy
    Guest

    RE: 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").RefreshTable
    > ActiveWorkbook.Save
    > ActiveWindow.Close
    >
    >


  3. #3
    Erik
    Guest

    Re: 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



  4. #4
    Tom Ogilvy
    Guest

    RE: 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").RefreshTable
    > ActiveWorkbook.Save
    > ActiveWindow.Close
    >
    >


  5. #5
    Erik
    Guest

    Re: 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



  6. #6
    Erik
    Guest

    Re: 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").RefreshTable
    > ActiveWorkbook.Save
    > ActiveWindow.Close



+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1