Results 1 to 6 of 6

Thread: [RESOLVED] Files developed for XL2010 breaking when opened/saved in XL2013

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2017
    Posts
    3

    Resolved [RESOLVED] Files developed for XL2010 breaking when opened/saved in XL2013

    Hi all,

    I have many XL files set up Early Binding referencing MS Word 14.0 Object Library...now we gotta go through the process of converting them to Late Binding.

    I found si_the_geek's XL Tutorial and this post: Useful functions and downloads

    Quote Originally Posted by si_the_geek View Post
    Excel constants module
    This is a pre-written module which contains all of the Excel constants (e.g.: xlLeft), to enable you to keep the constant names in your code when you are using Late-binding. Just add the module to your project! (NB: this download also contains similar modules for the other Office products).

    This is provided by Microsoft, and can be downloaded here: http://support.microsoft.com/kb/112671 (alternative)

    Note that the above file is designed for Excel 97, so it does not contain constants which have been added more recently (it does however contain almost everything you need). You can see a list of constants in the Excel 2003 constants page, which contains those for Excel 97 plus newer ones.
    (I hope I got that quote right...since I had to create it from scratch, so to speak)

    Since that post is ancient, those links are dead. I tried Googling for updated info to no avail.

    Anyone know if MS is maintaining this with each new version? Links to download module please? Or...does someone have that module (or a sample) they can post...or a tutorial/example to walk me through setting my own up?

    Thanks for any help anyone can provide,

    CTB

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,930

    Re: Files developed for XL2010 breaking when opened/saved in XL2013

    Welcome to VBForums

    I suspected this would happen (which is why I included an alternative link), but at least the constants page is still there (but converting that to code based constants would take a lot more work).

    Thankfully an archive site has a copy of the page, and apparently the download:
    http://wayback.archive.org/web/20141....com/kb/112671
    I haven't tested this, so would recommend taking precautions (eg: open it in a Virtual Machine if you have the option).
    edit: I'd recommend using the file in the post below instead!


    While looking for it, I found an alternative to the constants page:
    https://msdn.microsoft.com/en-us/lib...constants.aspx
    ...and a page that seems to describe how to get the values of all constants (basically the equivalent of the constants page):
    https://support.microsoft.com/en-us/...ce-application
    Last edited by si_the_geek; Apr 13th, 2017 at 05:31 AM.

  3. #3
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,930

    Re: Files developed for XL2010 breaking when opened/saved in XL2013

    I decided to create a module based on the values on the constants pages (so I can add it directly to the tutorial), which I've attached. You can open it in Notepad to check the values etc.

    Could you give it a try, and see if it works for you?
    Attached Files Attached Files
    Last edited by si_the_geek; Apr 13th, 2017 at 06:43 AM.

  4. #4
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: Files developed for XL2010 breaking when opened/saved in XL2013

    you can also enumerate all the constants from the currently installed excel version using typelibraryinfo
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  5. #5

    Thread Starter
    New Member
    Join Date
    Apr 2017
    Posts
    3

    Resolved Re: Files developed for XL2010 breaking when opened/saved in XL2013

    Thanks, Si, for all of your help.

    Quote Originally Posted by si_the_geek View Post
    I decided to create a module based on the values on the constants pages (so I can add it directly to the tutorial), which I've attached. You can open it in Notepad to check the values etc.

    Could you give it a try, and see if it works for you?
    I hope you didn't go through too much trouble for that. I opened and looked at that file. I'm sure that would work just fine (hopefully someone else will be able to use it), but I don't need XL constants as these are XL files I'm working with.

    I need WD constants.


    Quote Originally Posted by si_the_geek View Post
    ...and a page that seems to describe how to get the values of all constants (basically the equivalent of the constants page):
    https://support.microsoft.com/en-us/...ce-application
    I used this method to create a list of all of WD's constants...so when it comes time, this will help out a lot.

    Thanks again,

    CTB
    Last edited by CTBarbarin; Apr 13th, 2017 at 01:51 PM. Reason: Forgot to mark question as answered

  6. #6
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,930

    Re: Files developed for XL2010 breaking when opened/saved in XL2013

    Quote Originally Posted by CTBarbarin View Post
    Thanks, Si, for all of your help.
    No problem, I'm glad you got a solution out of it

    As you now have it sorted out, could you please do us a little favour, and mark the thread as Resolved?
    (this saves time reading for those of us who like to answer questions, and also helps those who search to find answers)

    You can do it by clicking on "Thread tools" just above the first post in this thread, then "Mark thread resolved". (like various other features of this site, you need JavaScript enabled in your browser for this to work).

    I hope you didn't go through too much trouble for that.
    I figured you won't be the last person to want the now-gone download, so I should update the tutorial with some of the things I've posted here... thankfully the module was basically a glorified copy+paste (using a formula in Excel to write the code), so wasn't too bad.

    It's a shame the module isn't useful for you, but I'm sure at some point somebody else will let me know whether or not it works.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width