Excel VBA - Run Time Automation Error Announcing the arrival of Valued Associate #679: Cesar...

A letter with no particular backstory

How did Fremen produce and carry enough thumpers to use Sandworms as de facto Ubers?

What's the point of the test set?

What does this say in Elvish?

What does it mean that physics no longer uses mechanical models to describe phenomena?

Is CEO the "profession" with the most psychopaths?

How does the math work when buying airline miles?

How to identify unknown coordinate type and convert to lat/lon?

Why are vacuum tubes still used in amateur radios?

Does the Mueller report show a conspiracy between Russia and the Trump Campaign?

How to write capital alpha?

Is it fair for a professor to grade us on the possession of past papers?

How does light 'choose' between wave and particle behaviour?

How can I prevent/balance waiting and turtling as a response to cooldown mechanics

Do wooden building fires get hotter than 600°C?

Why are my pictures showing a dark band on one edge?

Is there any word for a place full of confusion?

The test team as an enemy of development? And how can this be avoided?

What are the discoveries that have been possible with the rejection of positivism?

Amount of permutations on an NxNxN Rubik's Cube

How often does castling occur in grandmaster games?

How to compare two different files line by line in unix?

How many time has Arya actually used Needle?

Drawing spherical mirrors



Excel VBA - Run Time Automation Error



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)Excel4Mac - can't find my VBA modules?Run-time error '1004';Excel VBA - Run-time Error 13 - Type MismatchExcel VBA Run-time error 9 subscrit out of rangerun time error 13 VBAExcel VBA error managementRuntime Error 91- Excel VBAVBA run time error 1004 when I protect the sheetExcel VBA syntax errorcommand button execute copy and paste of worksheets into a new workbook and then automatically runs a macro in the new worksheets





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







0















I have this below VBA code (pretty common found on this site itself as well as other places on the net to find SHA hash in VBA) that works just fine in Excel 2013 on Windows 7 32.



However the same code when run in Excel 2003 SP3 on Windows 7 32 gives Run Time Automation Error at line Set asc1 = CreateObject("System.Text.UTF8Encoding")



I am unclear why it is failing in Excel 2003. Assuming it has something to do with dot net framework I re-installed dot Net 4.0 while 3.5.1 is already part of Windows 7 and Feature already enabled.



There is very similar post on this site here but even it does not have a solution. What else should I troubleshoot further? Could this be something to do with missing or corrupt components / libraries or anything related?



Thanks.



 Public Function SHA1(str1)
Dim asc1 As Object
Dim enc1 As Object
Dim bytes, outstr, pos
Set asc1 = CreateObject("System.Text.UTF8Encoding")
Set enc1 = CreateObject("System.Security.Cryptography.SHA1CryptoServiceProvider")
bytes = asc1.GetBytes_4(str1)
bytes = enc1.ComputeHash_2((bytes))
outstr = ""

For pos = 1 To LenB(bytes)
outstr = outstr & LCase(Right("0" & Hex(AscB(MidB(bytes, pos, 1))), 2))
Next
SHA1 = outstr

Set asc1 = Nothing
Set enc1 = Nothing


End Function


Private Sub CommandButton1_Click()
Dim txt
txt = TextBox1.Text
TextBox2.Text = SHA1(txt)
End Sub


enter image description here










share|improve this question

























  • In the VBA Editor window, under Tools -> References, are any listed as missing on the machine/setup having the issue?

    – panhandel
    May 6 '16 at 19:11











  • @panhandel - Thanks for your input. How do I know if something is missing? Default ones are tick marked plus I already added System, mscorlib & MSXML5

    – patkim
    May 6 '16 at 19:30











  • Any missing would be prefixed with "MISSING: " like the 6th one on this pic: cpearson.com/images/MissingRef.png

    – panhandel
    May 6 '16 at 19:32











  • Ok got it. Nothing is missing in that case.

    – patkim
    May 6 '16 at 19:38











  • I also kinda completely glazed over the fact that you were going backwards from 2013 to 2003, in which case, it's not at all uncommon to have an upgraded dll referenced in 2013 which isn't backwards compatible to 2003. You would need to look through the reference list and see if you can find a highest common denominator of that dll to reference for both to work.

    – panhandel
    May 6 '16 at 19:39


















0















I have this below VBA code (pretty common found on this site itself as well as other places on the net to find SHA hash in VBA) that works just fine in Excel 2013 on Windows 7 32.



However the same code when run in Excel 2003 SP3 on Windows 7 32 gives Run Time Automation Error at line Set asc1 = CreateObject("System.Text.UTF8Encoding")



I am unclear why it is failing in Excel 2003. Assuming it has something to do with dot net framework I re-installed dot Net 4.0 while 3.5.1 is already part of Windows 7 and Feature already enabled.



There is very similar post on this site here but even it does not have a solution. What else should I troubleshoot further? Could this be something to do with missing or corrupt components / libraries or anything related?



Thanks.



 Public Function SHA1(str1)
Dim asc1 As Object
Dim enc1 As Object
Dim bytes, outstr, pos
Set asc1 = CreateObject("System.Text.UTF8Encoding")
Set enc1 = CreateObject("System.Security.Cryptography.SHA1CryptoServiceProvider")
bytes = asc1.GetBytes_4(str1)
bytes = enc1.ComputeHash_2((bytes))
outstr = ""

For pos = 1 To LenB(bytes)
outstr = outstr & LCase(Right("0" & Hex(AscB(MidB(bytes, pos, 1))), 2))
Next
SHA1 = outstr

Set asc1 = Nothing
Set enc1 = Nothing


End Function


Private Sub CommandButton1_Click()
Dim txt
txt = TextBox1.Text
TextBox2.Text = SHA1(txt)
End Sub


enter image description here










share|improve this question

























  • In the VBA Editor window, under Tools -> References, are any listed as missing on the machine/setup having the issue?

    – panhandel
    May 6 '16 at 19:11











  • @panhandel - Thanks for your input. How do I know if something is missing? Default ones are tick marked plus I already added System, mscorlib & MSXML5

    – patkim
    May 6 '16 at 19:30











  • Any missing would be prefixed with "MISSING: " like the 6th one on this pic: cpearson.com/images/MissingRef.png

    – panhandel
    May 6 '16 at 19:32











  • Ok got it. Nothing is missing in that case.

    – patkim
    May 6 '16 at 19:38











  • I also kinda completely glazed over the fact that you were going backwards from 2013 to 2003, in which case, it's not at all uncommon to have an upgraded dll referenced in 2013 which isn't backwards compatible to 2003. You would need to look through the reference list and see if you can find a highest common denominator of that dll to reference for both to work.

    – panhandel
    May 6 '16 at 19:39














0












0








0








I have this below VBA code (pretty common found on this site itself as well as other places on the net to find SHA hash in VBA) that works just fine in Excel 2013 on Windows 7 32.



However the same code when run in Excel 2003 SP3 on Windows 7 32 gives Run Time Automation Error at line Set asc1 = CreateObject("System.Text.UTF8Encoding")



I am unclear why it is failing in Excel 2003. Assuming it has something to do with dot net framework I re-installed dot Net 4.0 while 3.5.1 is already part of Windows 7 and Feature already enabled.



There is very similar post on this site here but even it does not have a solution. What else should I troubleshoot further? Could this be something to do with missing or corrupt components / libraries or anything related?



Thanks.



 Public Function SHA1(str1)
Dim asc1 As Object
Dim enc1 As Object
Dim bytes, outstr, pos
Set asc1 = CreateObject("System.Text.UTF8Encoding")
Set enc1 = CreateObject("System.Security.Cryptography.SHA1CryptoServiceProvider")
bytes = asc1.GetBytes_4(str1)
bytes = enc1.ComputeHash_2((bytes))
outstr = ""

For pos = 1 To LenB(bytes)
outstr = outstr & LCase(Right("0" & Hex(AscB(MidB(bytes, pos, 1))), 2))
Next
SHA1 = outstr

Set asc1 = Nothing
Set enc1 = Nothing


End Function


Private Sub CommandButton1_Click()
Dim txt
txt = TextBox1.Text
TextBox2.Text = SHA1(txt)
End Sub


enter image description here










share|improve this question
















I have this below VBA code (pretty common found on this site itself as well as other places on the net to find SHA hash in VBA) that works just fine in Excel 2013 on Windows 7 32.



However the same code when run in Excel 2003 SP3 on Windows 7 32 gives Run Time Automation Error at line Set asc1 = CreateObject("System.Text.UTF8Encoding")



I am unclear why it is failing in Excel 2003. Assuming it has something to do with dot net framework I re-installed dot Net 4.0 while 3.5.1 is already part of Windows 7 and Feature already enabled.



There is very similar post on this site here but even it does not have a solution. What else should I troubleshoot further? Could this be something to do with missing or corrupt components / libraries or anything related?



Thanks.



 Public Function SHA1(str1)
Dim asc1 As Object
Dim enc1 As Object
Dim bytes, outstr, pos
Set asc1 = CreateObject("System.Text.UTF8Encoding")
Set enc1 = CreateObject("System.Security.Cryptography.SHA1CryptoServiceProvider")
bytes = asc1.GetBytes_4(str1)
bytes = enc1.ComputeHash_2((bytes))
outstr = ""

For pos = 1 To LenB(bytes)
outstr = outstr & LCase(Right("0" & Hex(AscB(MidB(bytes, pos, 1))), 2))
Next
SHA1 = outstr

Set asc1 = Nothing
Set enc1 = Nothing


End Function


Private Sub CommandButton1_Click()
Dim txt
txt = TextBox1.Text
TextBox2.Text = SHA1(txt)
End Sub


enter image description here







microsoft-excel vba runtime-error






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited May 23 '17 at 12:41









Community

1




1










asked May 6 '16 at 15:06









patkimpatkim

3,2542725




3,2542725













  • In the VBA Editor window, under Tools -> References, are any listed as missing on the machine/setup having the issue?

    – panhandel
    May 6 '16 at 19:11











  • @panhandel - Thanks for your input. How do I know if something is missing? Default ones are tick marked plus I already added System, mscorlib & MSXML5

    – patkim
    May 6 '16 at 19:30











  • Any missing would be prefixed with "MISSING: " like the 6th one on this pic: cpearson.com/images/MissingRef.png

    – panhandel
    May 6 '16 at 19:32











  • Ok got it. Nothing is missing in that case.

    – patkim
    May 6 '16 at 19:38











  • I also kinda completely glazed over the fact that you were going backwards from 2013 to 2003, in which case, it's not at all uncommon to have an upgraded dll referenced in 2013 which isn't backwards compatible to 2003. You would need to look through the reference list and see if you can find a highest common denominator of that dll to reference for both to work.

    – panhandel
    May 6 '16 at 19:39



















  • In the VBA Editor window, under Tools -> References, are any listed as missing on the machine/setup having the issue?

    – panhandel
    May 6 '16 at 19:11











  • @panhandel - Thanks for your input. How do I know if something is missing? Default ones are tick marked plus I already added System, mscorlib & MSXML5

    – patkim
    May 6 '16 at 19:30











  • Any missing would be prefixed with "MISSING: " like the 6th one on this pic: cpearson.com/images/MissingRef.png

    – panhandel
    May 6 '16 at 19:32











  • Ok got it. Nothing is missing in that case.

    – patkim
    May 6 '16 at 19:38











  • I also kinda completely glazed over the fact that you were going backwards from 2013 to 2003, in which case, it's not at all uncommon to have an upgraded dll referenced in 2013 which isn't backwards compatible to 2003. You would need to look through the reference list and see if you can find a highest common denominator of that dll to reference for both to work.

    – panhandel
    May 6 '16 at 19:39

















In the VBA Editor window, under Tools -> References, are any listed as missing on the machine/setup having the issue?

– panhandel
May 6 '16 at 19:11





In the VBA Editor window, under Tools -> References, are any listed as missing on the machine/setup having the issue?

– panhandel
May 6 '16 at 19:11













@panhandel - Thanks for your input. How do I know if something is missing? Default ones are tick marked plus I already added System, mscorlib & MSXML5

– patkim
May 6 '16 at 19:30





@panhandel - Thanks for your input. How do I know if something is missing? Default ones are tick marked plus I already added System, mscorlib & MSXML5

– patkim
May 6 '16 at 19:30













Any missing would be prefixed with "MISSING: " like the 6th one on this pic: cpearson.com/images/MissingRef.png

– panhandel
May 6 '16 at 19:32





Any missing would be prefixed with "MISSING: " like the 6th one on this pic: cpearson.com/images/MissingRef.png

– panhandel
May 6 '16 at 19:32













Ok got it. Nothing is missing in that case.

– patkim
May 6 '16 at 19:38





Ok got it. Nothing is missing in that case.

– patkim
May 6 '16 at 19:38













I also kinda completely glazed over the fact that you were going backwards from 2013 to 2003, in which case, it's not at all uncommon to have an upgraded dll referenced in 2013 which isn't backwards compatible to 2003. You would need to look through the reference list and see if you can find a highest common denominator of that dll to reference for both to work.

– panhandel
May 6 '16 at 19:39





I also kinda completely glazed over the fact that you were going backwards from 2013 to 2003, in which case, it's not at all uncommon to have an upgraded dll referenced in 2013 which isn't backwards compatible to 2003. You would need to look through the reference list and see if you can find a highest common denominator of that dll to reference for both to work.

– panhandel
May 6 '16 at 19:39










2 Answers
2






active

oldest

votes


















3














A similar issue was discussed at https://stackoverflow.com/questions/375457/cant-instantiate-a-com-object-written-in-c-sharp-from-vba-vb6-ok on Stackoverflow.com.
The user got same "automation error" 0x80131700 in Excel VBA.



Taking inputs from the posted answers therein, I installed Office 2003 Update KB907417 from http://www.microsoft.com/en-us/download/details.aspx?id=10624 and the issue is resolved.






share|improve this answer

































    0














    The issue can be solved by installing the .NET Framework 3.5: https://www.microsoft.com/en-ca/download/details.aspx?id=21






    share|improve this answer
























    • Link only answer is useless, especially when it will be broken.

      – Toto
      Mar 12 '18 at 19:45












    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "3"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1073915%2fexcel-vba-run-time-automation-error%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    3














    A similar issue was discussed at https://stackoverflow.com/questions/375457/cant-instantiate-a-com-object-written-in-c-sharp-from-vba-vb6-ok on Stackoverflow.com.
    The user got same "automation error" 0x80131700 in Excel VBA.



    Taking inputs from the posted answers therein, I installed Office 2003 Update KB907417 from http://www.microsoft.com/en-us/download/details.aspx?id=10624 and the issue is resolved.






    share|improve this answer






























      3














      A similar issue was discussed at https://stackoverflow.com/questions/375457/cant-instantiate-a-com-object-written-in-c-sharp-from-vba-vb6-ok on Stackoverflow.com.
      The user got same "automation error" 0x80131700 in Excel VBA.



      Taking inputs from the posted answers therein, I installed Office 2003 Update KB907417 from http://www.microsoft.com/en-us/download/details.aspx?id=10624 and the issue is resolved.






      share|improve this answer




























        3












        3








        3







        A similar issue was discussed at https://stackoverflow.com/questions/375457/cant-instantiate-a-com-object-written-in-c-sharp-from-vba-vb6-ok on Stackoverflow.com.
        The user got same "automation error" 0x80131700 in Excel VBA.



        Taking inputs from the posted answers therein, I installed Office 2003 Update KB907417 from http://www.microsoft.com/en-us/download/details.aspx?id=10624 and the issue is resolved.






        share|improve this answer















        A similar issue was discussed at https://stackoverflow.com/questions/375457/cant-instantiate-a-com-object-written-in-c-sharp-from-vba-vb6-ok on Stackoverflow.com.
        The user got same "automation error" 0x80131700 in Excel VBA.



        Taking inputs from the posted answers therein, I installed Office 2003 Update KB907417 from http://www.microsoft.com/en-us/download/details.aspx?id=10624 and the issue is resolved.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited May 23 '17 at 12:41









        Community

        1




        1










        answered May 9 '16 at 13:30









        patkimpatkim

        3,2542725




        3,2542725

























            0














            The issue can be solved by installing the .NET Framework 3.5: https://www.microsoft.com/en-ca/download/details.aspx?id=21






            share|improve this answer
























            • Link only answer is useless, especially when it will be broken.

              – Toto
              Mar 12 '18 at 19:45
















            0














            The issue can be solved by installing the .NET Framework 3.5: https://www.microsoft.com/en-ca/download/details.aspx?id=21






            share|improve this answer
























            • Link only answer is useless, especially when it will be broken.

              – Toto
              Mar 12 '18 at 19:45














            0












            0








            0







            The issue can be solved by installing the .NET Framework 3.5: https://www.microsoft.com/en-ca/download/details.aspx?id=21






            share|improve this answer













            The issue can be solved by installing the .NET Framework 3.5: https://www.microsoft.com/en-ca/download/details.aspx?id=21







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Mar 12 '18 at 19:02









            clementgamacheclementgamache

            11




            11













            • Link only answer is useless, especially when it will be broken.

              – Toto
              Mar 12 '18 at 19:45



















            • Link only answer is useless, especially when it will be broken.

              – Toto
              Mar 12 '18 at 19:45

















            Link only answer is useless, especially when it will be broken.

            – Toto
            Mar 12 '18 at 19:45





            Link only answer is useless, especially when it will be broken.

            – Toto
            Mar 12 '18 at 19:45


















            draft saved

            draft discarded




















































            Thanks for contributing an answer to Super User!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1073915%2fexcel-vba-run-time-automation-error%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Why not use the yoke to control yaw, as well as pitch and roll? Announcing the arrival of...

            Couldn't open a raw socket. Error: Permission denied (13) (nmap)Is it possible to run networking commands...

            VNC viewer RFB protocol error: bad desktop size 0x0I Cannot Type the Key 'd' (lowercase) in VNC Viewer...