+ Reply to Thread
Results 1 to 2 of 2

Peculiar TypeName Issue

  1. #1
    Registered User
    Join Date
    07-01-2011
    Location
    Atlanta, Georgia
    MS-Off Ver
    Excel 2007
    Posts
    7

    Peculiar TypeName Issue

    Wanted to see if anyone else has come across this issue in Excel. I have an Excel add-in that uses the TypeName function to check if for ListView control. Add-in works fine on almost all users' machine. However, one user kept getting a VB error. After debugging, I found that on their machine, all of the ListView controls were referenced as a "ListView2" as opposed to "ListView", like it should be.

    Anyways, I was able to fix my code. But I'm curious why this happened, and if anyone knows the root cause. I believe the user did have Office 2010 installed on their machine at one time (before uninstalling it). So I'm thinking this might have something to do with it. But I'm not sure.

    Let me know if anyone else has come across this issue, or something similar.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Peculiar TypeName Issue

    Hello mwynn,

    I agree with you that is probably the name given to control under the 2010 operating system. The TypeName returns the object name as it is registered. Each release of Office and Windows does not guarantee that the object classes will remain unchanged. Generally, I test an object using the Like operator and a wildcard.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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