none
VBA error when running macro RRS feed

  • Question

  • Hi,

    I have been running the same macro in Excel for about 10 years without experiencing any errors. The macro is used to extract information from queries in Microsoft Access and generate an Excel file with the query information in it's sheets.

    After a recent update from Office 2013 to Office 2016, and at the same time an upgrade from Office 365 Business Premium to Enterprise E3, I can no longer run the macro. I receive the following error message: "License information for this component not found. You do not have the appropriate license to use this functionality".

    I've been in contact with Microsoft support, but they can't find any solution to my problem. I've tried downgrading to Office 2013, but without any success. Google searches suggest that the error is caused by a corrupt Windows registry, but none of the proposed solutions have solved my problem thus far - and most of them are related to older version of Windows (I'm using Windows 10.

    Does anyone know what's causing the error, and how to solve it?

    I should mention that I'm not the writer of the macro, and that my VBA knowledge is very limited. I'll post the macro code here if necessary.

    Friday, June 3, 2016 6:31 AM

Answers

  • Hi fredrik_bk,

    I can understand that to downgrade from newer version to older version is not so convenient.

    and we had tried almost everything to solve the issue so that the code can be run on the newer version without success.

    I think that you can give your valuable feedback on Excel User Voice regarding this issue that the code is not working in newer version of office Application.

    so that they can look in to that and try to fix it so that other users will not have to face such kind of issue.

    Following is the link for the Excel User Voice.

    Excel User Voice

    The other thing you had mentioned that you had a new issue that you are not able to open file in office 2016 by default as there is more then one version of office are installed.

    so the easiest solution is Right click on the file. then select open with option.

    in that option select  the office application version 2016 then at that time you will see a check box at the bottom and it has a text like check the check box if you want to use this application by default to open this kind of file.

    check it and now when you next time double click the file it will open in that version of office.

    The another option is also available but it is little difficult. for that visit the link below.

    Default Program With Multiple Versions Installed

    Disclaimer: This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.

    Thanks for your understanding.

    Regards

    Deepak


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by fredrik_bk Tuesday, July 5, 2016 8:13 AM
    Tuesday, July 5, 2016 3:20 AM
    Moderator

All replies

  • Hi fredrik_bk,

    You need register it.
    Define what component your are using, try register the required register file for the component.

    please visit the links below.

    License Information for This Component Not Found

    License information for this component not found...

    solution is also provided in the link.

    Regards

    Deepak


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, June 6, 2016 12:25 AM
    Moderator
  • Thank you very much for your answer!

    I've checked out this page some times now, but I'm not sure how to use it. How can I figure out which control(s) that are used in the macro? Furthermore, the article seems to be related to Visual Basic ("...double-click on the file Vbctrls.reg on the Visual Basic CD-ROM") and not Visual Basic for Applications.

    Monday, June 6, 2016 6:28 AM
  • Hi fredrik_bk,

    did you use any controls in Access or you are having just a simple query that fetch the data and generate excel file.

    can you show us your code so that we can try to test on our side.

    did error message displayed the name of the control?

    it might be help us to narrow down the issue.

    Regards

    Deepak


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, June 7, 2016 5:14 AM
    Moderator
  • The data is extracted without opening Access, and the error prompts before the program steps into the Access database. When I run the debug in VBA, I get a different error message: "ActiveX component can't create object".

    I've uploaded the Excel file containing the VBA-code here:

    http://www.filedropper.com/showdownload.php/program_7

    Tuesday, June 7, 2016 6:41 AM
  • Hi fredrik_bk,

    your shared link open the page that displays the same links instead of file.

    did we have to login to access file if so then please use another way to share the file.

    or you can directly post your code here it is also ok. here you can use "Insert code block" button to insert your code.

    Regards

    Deepak


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, June 7, 2016 7:22 AM
    Moderator
  • Oups, sorry. This link should be the correct one: http://www.filedropper.com/program_7

    The code is also pasted below. It's quite long because it extracts multiple queries.

    'Tools --> References --> Microsoft DAO 3.6 Object Library must be checked
    
    Option Base 1
    Dim ENBfil As String
    Dim db As Database, rs As Recordset
    Dim Tabelltittel(20) As String
    Dim Tabellquery(20) As String
    Dim Tabellsum(20) As String
    Dim Informasjon(20) As String
    Dim AntallKolonner As Integer
    Dim komma, prosent, tusen As String
    Dim kol As Integer, navnkol As Integer, nettkol As Integer
    
    
    
    Sub HentUtTabeller()
        Application.ScreenUpdating = False
        ENBfil = Range("access_file").Value
            
        AntallKolonner = 0
        
        Tabelltittel(1) = "01 Oversikt"
        Tabelltittel(2) = "02 Byggestatus"
        Tabelltittel(3) = "03 Boligtype"
        Tabelltittel(4) = "04 Meglere"
        Tabelltittel(5) = "05 Utbyggere"
        Tabelltittel(6) = "06 Ledige byggestatus"
        Tabelltittel(7) = "(06b Hist. ledig ferdig)"
        Tabelltittel(8) = "07a Salgstakt"
        Tabelltittel(9) = "07b Salgstakt byggestatus"
        Tabelltittel(10) = "(08a Salgstakt1 historisk)"
        Tabelltittel(11) = "(08b Salgstakt2 historisk)"
        Tabelltittel(12) = "09 Dyreste"
        Tabelltittel(13) = "10 Raskeste"
        Tabelltittel(14) = "11-21 Prosjektoversikt"
        Tabelltittel(15) = "Nullsalg"
        Tabelltittel(16) = "Prisgrupper"
        Tabelltittel(17) = "Liggetider"
        Tabelltittel(18) = "Utbyggere etter salg"
        Tabelltittel(19) = "Meglere etter salg"
        
        Tabellquery(1) = "Rapport_T01"
        Tabellquery(2) = "Rapport_T02"
        Tabellquery(3) = "Rapport_T03"
        Tabellquery(4) = "Rapport_T04"
        Tabellquery(5) = "Rapport_T05"
        Tabellquery(6) = "Rapport_T06"
        Tabellquery(7) = ""
        Tabellquery(8) = "Rapport_T07a"
        Tabellquery(9) = "Rapport_T07b"
        Tabellquery(10) = ""
        Tabellquery(11) = ""
        Tabellquery(12) = "Rapport_T09"
        Tabellquery(13) = "Rapport_T10"
        Tabellquery(14) = "Rapport_T_prosjekter"
        Tabellquery(15) = "Rapport_nullsalg"
        Tabellquery(16) = "Rapport_prisgrupper"
        Tabellquery(17) = "Rapport_T11"
        Tabellquery(18) = "Rapport_T05_salgstakt"
        Tabellquery(19) = "Rapport_T04_salgstakt"
        
        Tabellsum(1) = "Rapport_T01_sum"
        Tabellsum(2) = "Rapport_T02_sum"
        Tabellsum(3) = "Rapport_T03_sum"
        Tabellsum(4) = ""
        Tabellsum(5) = ""
        Tabellsum(6) = "Rapport_T06_sum"
        Tabellsum(7) = ""
        Tabellsum(8) = "Rapport_T07a_sum"
        Tabellsum(9) = "Rapport_T07b_sum"
        Tabellsum(10) = ""
        Tabellsum(11) = ""
        Tabellsum(12) = ""
        Tabellsum(13) = ""
        Tabellsum(14) = ""
        Tabellsum(15) = ""
        Tabellsum(16) = ""
        Tabellsum(17) = "Rapport_T11_sum"
        Tabellsum(18) = ""
        Tabellsum(19) = ""
        
        Informasjon(1) = ""
        Informasjon(2) = ""
        Informasjon(3) = ""
        Informasjon(4) = ""
        Informasjon(5) = ""
        Informasjon(6) = ""
        Informasjon(7) = "Hentes fra eget regneark"
        Informasjon(8) = ""
        Informasjon(9) = ""
        Informasjon(10) = "Hentes fra eget regneark"
        Informasjon(11) = "Hentes fra eget regneark"
        Informasjon(12) = ""
        Informasjon(13) = ""
        Informasjon(14) = ""
        Informasjon(15) = "Til informasjon i teksten. Venstre kolonne er antall solgt, høyre kolonne er antall prosjekter med det antallet solgt. Altså er nullsalget tallet til høyre for 0, men vi legger også til tallene ved siden av minus. Tallet ved siden av blank (altså øverst) skal tilsvare de nye prosjektene."
        Informasjon(16) = "Til informasjon i teksten. Man tar selvfølgelig ikke med alle. Antall og Andel ved raden som starter med 35 viser for eksempel hvor mange av leilighetene i denne utgaven som koster mer enn 35.000"
        Informasjon(17) = ""
        Informasjon(18) = ""
        Informasjon(19) = ""
        
        'hente ut fra database:
        Set db = OpenDatabase(ENBfil)
        
        'lag nytt excel-dokument:
        
        Workbooks.Add 1
        ExcelFil = Workbooks(Workbooks.Count).Name
        Workbooks(ExcelFil).Activate
        
        'hent og skriv ut tabellene, lag nye worksheets i excel-dokumentet:
        
        For tabellnummer = 1 To 19
            Workbooks(ExcelFil).Sheets.Add
            Workbooks(ExcelFil).Activate
            Workbooks(ExcelFil).Sheets("Sheet" & tabellnummer + 1).Select
            Workbooks(ExcelFil).Sheets("Sheet" & tabellnummer + 1).Name = Tabelltittel(tabellnummer)
            Workbooks(ExcelFil).Sheets(Tabelltittel(tabellnummer)).Select
            
            'If tabellnummer > Workbooks(ExcelFil).Sheets.Count Then
            '    Set nyttark = Workbooks(ExcelFil).Sheets.Add
            'End If
            'Workbooks(ExcelFil).Activate
            'Workbooks(ExcelFil).Sheets(tabellnummer).Name = Tabelltittel(tabellnummer)
            'Workbooks(ExcelFil).Sheets(tabellnummer).Select
                
            Set TargetRange = Range("A1")
        
            If Not Tabellquery(tabellnummer) = "" Then   'lim inn selve tabellinnholdet, inkl. overskriftene
                Set rs = db.OpenRecordset(Tabellquery(tabellnummer), dbReadOnly)
                AntallKolonner = rs.Fields.Count
                For intColIndex = 0 To rs.Fields.Count - 1
                    TargetRange.Offset(1, intColIndex).Value = rs.Fields(intColIndex).Name
                Next
        
                ' Manuell gjennomgang av hver post og felt - gunstig å bruke for feilsøking. VEI added 24/11/08. Bruk denne eller copyFromRecordSet under
                'i = 0
                'With rs
                '    Do While Not .EOF
                '        For intColIndex = 0 To rs.Fields.Count - 1
                '            TargetRange.Offset(2 + i, intColIndex).Value = rs.Fields(intColIndex).Value
                '        Next
                '        i = i + 1
                '        .MoveNext
                '    Loop
                'End With
                
                TargetRange.Offset(2, 0).CopyFromRecordset rs
                
            End If
            
            If Not Tabellsum(tabellnummer) = "" Then    'skriv på summer der det er aktuelt (definert som egne queries i access)
                Set rs = db.OpenRecordset(Tabellsum(tabellnummer), dbReadOnly)
                For noen = 1 To 10: Selection.End(xlDown).Select: Next noen: Selection.End(xlUp).Select 'sikre at man kommer nederst i arket
                ActiveCell.Offset(1, 0).CopyFromRecordset rs
            End If
            
            
            
        
            
            '''''''''''''''''''''''''
            'FORMATERING STARTER HER'
            '''''''''''''''''''''''''
            
            
            komma = "0.0": prosent = "0%": tusen = "# ###"
            tf = ""
        
            For a = 1 To AntallKolonner
                Columns(a).NumberFormat = "0"
                Select Case tabellnummer
                Case 1
                    If a = 5 Or a = 6 Or a = 7 Or a = 8 Then tf = komma
                    If a = 9 Then tf = prosent
                Case 2
                Case 3
                Case 4
                    If a = 4 Then tf = komma
                    If a = 5 Then tf = prosent
                Case 5
                    If a = 4 Then tf = komma
                    If a = 5 Then tf = prosent
                Case 6
                Case 8
                    If a = 7 Or a = 8 Then tf = prosent
                Case 9
                    If a = 6 Or a = 7 Then tf = prosent
                Case 12, 13, 14
                    If a = 6 Or a = 8 Or a = 9 Or a = 10 Then tf = komma
                    If a = 11 Or a = 12 Or a = 13 Or a = 14 Then tf = prosent
                    If a = 7 Then tf = tusen
                    If a = 20 Or a = 21 Or a = 22 Then tf = "0"
                Case 16
                    If a = 3 Then tf = prosent
                Case 17
                    If a = 5 Or a = 7 Or a = 9 Then tf = komma
                    If a = 6 Or a = 8 Then tf = ""
                Case 18
                Case 19
                End Select
                Columns(a).NumberFormat = tf
                Columns(a).Font.Name = "Arial Narrow"
                Columns(a).Font.Size = 8
                Columns(a).EntireColumn.AutoFit
            Next a
        
            If tabellnummer = 12 Or tabellnummer = 13 Or tabellnummer = 14 Then
                'spesiell formatering for hovedtabellen og andre med samme format
                'legg til "k" for konfidensiell makspris
                'legg til merking av gamle og ukjente prosjekter i hovedtabellen
                
                makspriskolonne = 10
                antallsolgtforrigekolonne = 12
                For x = 1 To 10000
                    If TargetRange.Offset(x, makspriskolonne - 1).Value = -1 Then
                        TargetRange.Offset(x, makspriskolonne - 1).Value = "k   "
                        TargetRange.Offset(x, makspriskolonne - 1).HorizontalAlignment = xlRight
                    End If
                    
                    If TargetRange.Offset(x, antallsolgtforrigekolonne - 1).Value = 98 Then
                        TargetRange.Offset(x, antallsolgtforrigekolonne - 1).Value = "u   "
                        TargetRange.Offset(x, antallsolgtforrigekolonne - 1).HorizontalAlignment = xlRight
                    End If
                
                    If TargetRange.Offset(x, antallsolgtforrigekolonne - 1).Value = 99 Then
                        TargetRange.Offset(x, antallsolgtforrigekolonne - 1).Value = "n   "
                        TargetRange.Offset(x, antallsolgtforrigekolonne - 1).HorizontalAlignment = xlRight
                    End If
                Next x
        
                
                'legg til regionoverskrifter, bare hovedtabellen
                'kolonne 19 har regionene, kolonne 3 har navnene
                    kol = 19: navnkol = 3
                If tabellnummer = 14 Then
                    For rad = 2 To 10000
                        If Not TargetRange.Offset(rad, kol - 1).Value = TargetRange.Offset(rad - 1, kol - 1).Value Then
                            rad = rad + 1
                            Rows(rad).Insert Shift:=xlDown
                            TargetRange.Offset(rad - 1, navnkol - 1).Value = TargetRange.Offset(rad, kol - 1).Value 'skriv på regiontittel
                            TargetRange.Offset(rad - 1, navnkol - 1).Font.Size = 14
                            TargetRange.Offset(rad - 1, navnkol - 1).Font.Name = "Arial"
                            TargetRange.Offset(rad - 1, navnkol - 1).RowHeight = 36
                            rad = rad + 1
                            
                            'kopiere kolonneoverskrifter:
                            Range("A2:Z2").Copy
                            Rows(rad).Insert Shift:=xlDown
                            rad = rad + 1
                                                
                        End If
                    Next rad
                End If
                
                'legg til nettadresser (kolonne 18 har nettadressene) - dette kaller en egen "sub" som ligger lenger ned
                nettkol = 18
                TilordneNettadresse navnkol, nettkol
            End If
        
            '''''''''''''''''''''''''
            'FORMATERING FERDIG'
            '''''''''''''''''''''''''
        
            If Not Informasjon(tabellnummer) = "" Then 'skriv på ekstra tekst
                For noen = 1 To 10: Selection.End(xlDown).Select: Next noen: Selection.End(xlUp).Select 'sikre at man kommer nederst i arket
                ActiveCell.Offset(4, 0).Value = Informasjon(tabellnummer)
                'ActiveCell.Offset(4, 0).WrapText = True
            End If
        
        
        Next tabellnummer
        
        
        'lukk databasen
        Set rs = Nothing
        db.Close
        Set db = Nothing
        
        
        Application.ScreenUpdating = True
    End Sub
    
    
    Sub TilordneNettadresse(NavnKolonne As Integer, HyperlinkKolonne As Integer)
        Dim Startrad As Long, Sluttrad As Long
        Dim Nettadresse As String
        Dim fname As String, fsize As Integer
        
        
        Startrad = 3
        Sluttrad = 10000
        
        'disse har vært brukt tidligere ved "manuell" kjøring:
        'NavnKolonne = InputBox("Kolonne med navnedata (skriv 1 hvis kolonne A, 2 hvis kolonne B etc")
        'HyperlinkKolonne = InputBox("Kolonne med hyperlinkdata (skriv 1 hvis kolonne A, 2 hvis kolonne B etc")
        'Startrad = InputBox("Startrad (vanligvis 2, hvis det er en overskriftsrad først)")
        'Sluttrad = InputBox("Sluttrad (den siste raden med data)")
        
        Set TargetRange = Range("A1")
        
        Startrad = Startrad - 1: Sluttrad = Sluttrad - 1: NavnKolonne = NavnKolonne - 1: HyperlinkKolonne = HyperlinkKolonne - 1
        
        For i = Startrad To Sluttrad
            Nettadresse = TargetRange.Offset(i, HyperlinkKolonne).Value
            If (Nettadresse <> "") And (Nettadresse <> "Nettadresse") Then
                fname = TargetRange.Offset(i, NavnKolonne).Font.Name
                fsize = TargetRange.Offset(i, NavnKolonne).Font.Size
                ActiveSheet.Hyperlinks.Add Anchor:=TargetRange.Offset(i, NavnKolonne), Address:=Nettadresse, TextToDisplay:=TargetRange.Offset(i, NavnKolonne).Value
                TargetRange.Offset(i, NavnKolonne).Font.Name = fname
                TargetRange.Offset(i, NavnKolonne).Font.Size = fsize
            End If
        Next i
    
        
    End Sub
    
    
    

    Tuesday, June 7, 2016 11:28 AM
  • Hi fredrik_bk,

    I test your file on my side on Excel 2016 but I did not get errors like you.

    I get the error because I don't have your database and another excel file. you have mentioned that you get error "ActiveX component can't create object"

    This behavior can occur if any of the following conditions   are true:   
    • Data Access Objects (DAO) is not properly registered.

      -or-
    • One or more references are missing.

      -or-
    • There is a utility database reference that is not valid.

      -or-
    • You do not have the required permissions for required libraries.

      -or-
    • There is a damaged wizard file.

    You receive a "ActiveX component can't create object" error message when using Access

    here I would recommend you to repair your ms office or if possible reinstall it and without office 365 first try to run the file so that we can confirm that the issue is not related with office 365.

    Regards

    Deepak


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, June 8, 2016 6:40 AM
    Moderator
  • Once again, thank you for a very good answer!

    I've run through the first four steps in the article:

    1) I registered  DAO360.dll file successfully

    2) None of the checked references seems to be missing

    3) There is no reference to a utility database

    4) I'm the administrator and only user on the computer, so it shouldn't be an issue with proper permissions.

    5) I've not this step yet. However, I've both tried to repair Office and reinstalling it without success. Is it possible that the files Acwzmain.mde, Acwztool.mde and Acwzlib.mde are not replaced during repair/reinstallation?

    When I step into the code in VBA, I notice that the error prompts at the following line (ln 106):

    Set db = OpenDatabase(ENBfil)

    , where ENBfil is set to ENBfil = Range("file path and name").Value.

    Could there be an error in the way the database is looked up (although it's been running properly for 10 years)=


    Wednesday, June 8, 2016 7:27 AM
  • Hi fredrik_bk,

    did you mean that this time its another new error comes at above mentioned line.

    which error is displayed to you?

    so now overall we have 3 different errors right?

    (1) License information for this component not found. You do not have the appropriate license to use this functionality

    (2) ActiveX component can't create object

    (3) Set db = OpenDatabase(ENBfil)

    I never seen this type of behavior when it gives new error every time.

    I want to confirm with you that did above 2 errors are also still displayed to you or just displayed you a 3rd error.

    here I would first recommend you to try to run your code with database and with another excel file on another machine. so that we can get the idea that the issue is specific to your machine or not.

    because I also use Excel Access 2016 to run code but I did not get error like that.

    I try to debug the code but I did not get error on Set db = OpenDatabase(ENBfil).

    the error on this place can occur when database is already open.

    so make sure it is closed before you open from code.

    and again make a try to run it and let see what happens next.

    Regards

    Deepak


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, June 8, 2016 7:55 AM
    Moderator
  • Sorry, I was imprecise. Set db = OpenDatabase(ENBfil) is not the error, but the code on line 106. I receive the error "ActiveX component can't create object" at this line.

    So, I only receive two errors:

    1. License information for this component not found. You do not have the appropriate license to use this functionality

    This appears when I run the macro in Excel.

    2. ActiveX component can't create object

    This appears when I run the code in VBA, and the debug shows that it prompts at line 106.

    I tried to copy the code into a new work file, and to specify another database (both *.mdb and *.accdb), but the I still receive the same error.





    Wednesday, June 8, 2016 8:39 AM
  • Hi fredrik_bk

    you got this error on line no.106

    I check the line no 106 is below.

    Workbooks.Add 1

    but there is no error.

    did you try to run this on another machine?

    I think you should try it.

    Regards

    Deepak


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, June 9, 2016 9:08 AM
    Moderator
  • Hi, Deepak

    Perhaps my counting was wrong. A few lines above Workbooks.Add 1, I have the following line:

    Set db = OpenDatabase(ENBfil)

    This is the one causing the error.

    I've run the macro in several Excel files, with different Access databases and on multiple computers (all recently updated to Office 2016). The error is the samme in all cases.

    Thursday, June 9, 2016 11:21 AM
  • Hi fredrik_bk,

    I check that line and I confirm here that there is no error at this line.

    Hope in ENBfil you have mentioned the correct path of database when you try to run this on different machines.

    then also I am going to discuss this thread with other Engineers to look in to this issue if they find something in this matter.

    probably I will discus in the meeting in next week.

    Regards

    Deepak


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, June 10, 2016 6:10 AM
    Moderator
  • Hi fredrik_bk,

    is your issue solved? did you find any work around for this or still the problem is exist?

    are you able to run your macro now?

    Regards

    Deepak


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, June 16, 2016 9:06 AM
    Moderator
  • Hi Depaak,

    I'm sorry for not comming back to you sooner, but I'm been off work for holiday.

    The issue is still unsolved. The path to the database in "ENBfil" is correct.

    I've found out that formating a computer, installing a clean copy of Windows and then install Office solves the problem. But since we are running the code on many computers, this is a quite cumbersome and time consuming solution..

    Monday, June 27, 2016 12:29 PM
  • Hi fredrik_bk,

    if you got and error on ENBfil and you had also checked that path is also correct in ENBfil.

    then try to provide the path directly instead of saving it into ENBfil and check whether you still got error.

    the other thing I can say that it is possible that because of some ambiguous updates you had seen this behavior.

    so I think you should check about the updates on the machines that have the issue.

    you can try to uninstall that unambiguous updates and try to make a similar environment like the one on which you are able to run your code successfully.

    if you have update id then you can also mentioned here so that if another member have issue with this update can try to help you or can give you some information.

    Regards

    Deepak


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, June 28, 2016 2:57 AM
    Moderator
  • Hi Depaak,

    I've tried to replace ENBfil with the file path, but the error is the same.

    Do you mean Windows or Office update?

    If Office, this shouldn't be the issue as I've tried completely removing Office with all it's updates, and reinstalling it (I've tried reinstalling both 2013 and 2016), but the error remains the same.

    Regards,

    Fredrik

    Tuesday, June 28, 2016 10:53 AM
  • Hi fredrik_bk,

    I mean both windows and office updates.

    because many times because of the updates many things are got changed without any confirmation and warning and after that when user try to do something at that time he came to know about this.

    and for some ambiguous updates solutions are available and if solutions are not available then by removing that update we can try to solve the issue.

    Regards

    Deepak 


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, June 29, 2016 5:51 AM
    Moderator
  • Hi Depaak,

    I've tried uninstalling Windows updates, but I'm only allowed to uninstall the security updates. Uninstalling these didn't help. I'm not sure how to uninstall Office 365 updates, or if this is relevant - as I've reinstalled Office several times.

    However, I've found a sub-optimal solution. Installing a version of Office 2010 on top of Office 365 allow me to run the code without error. After removing Word, Powerpoint, OneNote and Outlook from the 2010-install, the code still runs properly. But when I remove Excel, the error appear again.  I was hoping the solution lied in the VBA-sertificats included in the 2010 installation, but apparently - it lies in Excel.

    I can accept two Office installations on my computer, but this causes a new problem: I'm not allowed to choose Excel 2016 as default to run *.xls or *.xlsx files. Is there a way to solve this?

    Monday, July 4, 2016 7:30 AM
  • Hi fredrik_bk,

    I can understand that to downgrade from newer version to older version is not so convenient.

    and we had tried almost everything to solve the issue so that the code can be run on the newer version without success.

    I think that you can give your valuable feedback on Excel User Voice regarding this issue that the code is not working in newer version of office Application.

    so that they can look in to that and try to fix it so that other users will not have to face such kind of issue.

    Following is the link for the Excel User Voice.

    Excel User Voice

    The other thing you had mentioned that you had a new issue that you are not able to open file in office 2016 by default as there is more then one version of office are installed.

    so the easiest solution is Right click on the file. then select open with option.

    in that option select  the office application version 2016 then at that time you will see a check box at the bottom and it has a text like check the check box if you want to use this application by default to open this kind of file.

    check it and now when you next time double click the file it will open in that version of office.

    The another option is also available but it is little difficult. for that visit the link below.

    Default Program With Multiple Versions Installed

    Disclaimer: This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.

    Thanks for your understanding.

    Regards

    Deepak


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by fredrik_bk Tuesday, July 5, 2016 8:13 AM
    Tuesday, July 5, 2016 3:20 AM
    Moderator
  • Thank you for all your answers! I will post my experience on Excel User Voice.

    The link solved the multiple versions issue. Thank's!

    Regards,

    Fredrik

    Tuesday, July 5, 2016 8:13 AM