opeing a file without error message

  • Hi there,


    I have read previous posts but they dont seem to work.


    I have a file already open and i want to reopen it so two versions are open.


    The code then saves the original as another name and does not change the data therfore of this.


    Any ideas: code is below


    Workbooks.Open ("C:\Documents and Settings\shorton\Desktop\Oracle Support GL Maintenance Systemv2.xls")


    ActiveWorkbook.SaveAs Filename:="R:\COMMON\ORACLE\TEST_Approved\" & Range("a12") & "_" & Range("b14") & "_" & Format(Date, "dd-mm-yy") & "_" & Format(Time, "HH-MM AM/PM") & ".xls", FileFormat:=xlNormal, _
    Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _
    CreateBackup:=False
    Application.DisplayAlerts = False
    Unload Me

  • Hi,


    you should open the same workbook with a new excel-application.


    try this:



    I've posted an example: copy it to c:\tmp or change the directory in the code and press the button after opening.


    You should be able to use this code for your example.


    Hope this solves the problem.


    Gollem

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!