VBA in Excel 2010 don't work in 2013

Johny Doe

New Member
Joined
Jan 18, 2015
Messages
8
Hi I'm using a macro that has function:
(My problem is, when I using Excel 2013. When excel is 2010 everything is OK)

1) On open, my .xlsm file, open external workbook, and update in background (Workbook.Visible = False)

excel 2013 open it behind of Active Worksheet (I can preview this file for several second) and leave (not close) blank excel instance.

2) when click button, assigned macro select Sheet "Search" (this sheet is only for "GUI purpose only" with text in it "Searching") and on exit macro, back to previous Sheet.

My macro:

Code:
Sub My_Macro()

Sheets("Search").Activate ' Have the same problem when I used .Select function

    Application.ScreenUpdating = False

    Dim OrginalFileName As String
    Dim xlApp As New Excel.Application

    xlApp.Visible = False 

    OrginalFileName = ActiveWorkbook.Name
    
    xlApp.Workbooks.Open Filename:="\\LOCATION\TO\FILE\FILE.XLSX"
    
    Workbooks(OrginalFileName).Activate


......
....'some actions
.. 


   xlApp.Workbooks("FILE.XLSX").Close SaveChanges:=False
   xlApp.Quit
   Set xlApp = Nothing


Application.ScreenUpdating = True
Sheets("MENU_1").Activate

End Sub

Is there any chance to "repair" this?

Sorry for my bad english
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.

Forum statistics

Threads
1,216,066
Messages
6,128,568
Members
449,458
Latest member
gillmit

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top