+ Reply to Thread
Results 1 to 4 of 4

Application installation started accidently by VBA code in Excel

  1. #1
    Registered User
    Join Date
    02-20-2019
    Location
    Finland
    MS-Off Ver
    O365 2016
    Posts
    2

    Application installation started accidently by VBA code in Excel

    Hello,

    I tried to found something similar from web but did not found anything alike so decided to ask from here.


    In our corporation we have one Excel workbook which contains forms and VBA code to connect with REST to server to exchange data between client and server.

    At one point of program execution, there's a form with a couple listview components, which are applied on the form at the design time. That listview component is from MsComctllib in VBA editor (Microsoft Listview Control, version 6.0 in MSCOMCTL.OCX).

    Those works perfectly fine but, during code execution a new ListView is created like:

    Dim RefList as ListView
    Set RefList = New ListView


    Immediately when program passes that line, where new listview is initialised Microsoft Installer kicks in and begins to install Aveva 3D modelling software, which has nothing to do with this whole Excel application. Aveva is totally separate application and is installed to users computer. I do not understand why initialization of ListView at the run-time starts software (.msi) installation.

    Is there any other way how I could initialize in-memory (non-visible) Listview control at the run-time than using New keyword, or any other ideas what may cause this kind of behavior?

  2. #2
    Registered User
    Join Date
    02-20-2019
    Location
    Finland
    MS-Off Ver
    O365 2016
    Posts
    2

    Re: Application installation started accidently by VBA code in Excel

    I changed to code so that runtime listview is initialized with late-binding like this

    Set RefList = CreateObject("MSComctlLib.ListViewCtrl.2")

    But it did not help either. When this line of code is executed Windows installer starts-up and begins to re-install that Aveva application, for reason that I do not understand why.

  3. #3
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,908

    Re: Application installation started accidently by VBA code in Excel

    This usually means that you have a broken installation. What happens if you allow the installation to complete, or uninstall that program completely and then reinstall it?
    Rory

  4. #4
    Valued Forum Contributor Haluk's Avatar
    Join Date
    02-14-2019
    Location
    Turkiye
    MS-Off Ver
    2010 - 64 Bit on Windows-11 (22 H2) 64 Bit
    Posts
    1,150

    Re: Application installation started accidently by VBA code in Excel

    If you want to add the control ListView1 at run time, you may use this ..... but I am not sure if this solves your Windows installer problem. I believe in rorya's suggestion.

    Please Login or Register  to view this content.
    Last edited by Haluk; 02-21-2019 at 03:07 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] VBA code to change the application.username and application.userinitials
    By jwlamb in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-10-2014, 11:25 PM
  2. Replies: 1
    Last Post: 07-08-2012, 05:29 PM
  3. Return to page where code was started
    By batchy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-07-2011, 06:32 AM
  4. Get installation path of an application
    By efernandes67 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-09-2011, 10:35 AM
  5. [SOLVED] i don't have my installation cd, where can i get excel solver?
    By Ben82 in forum Excel General
    Replies: 1
    Last Post: 04-10-2006, 02:20 PM
  6. [SOLVED] Accidently deleted rows in Excel.
    By Pelochino in forum Excel General
    Replies: 2
    Last Post: 10-13-2005, 05:05 PM
  7. [SOLVED] Can you recover Excel files accidently closed using autosave?
    By Mazamban in forum Excel General
    Replies: 2
    Last Post: 06-06-2005, 01:05 PM

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