+ Reply to Thread
Results 1 to 10 of 10

Maintaining Maximum Platform Compatibility

  1. #1
    Bob the Kart Racing fool
    Guest

    Maintaining Maximum Platform Compatibility

    I am just learning about all the issues associated with maintaining
    compatibility between different software years, discovered when I sent the
    completed file to my boss for approval… low and behold, a reference error.
    So now, trying desperately to gather my pride from the floor, I come to you
    because this forum has helped me so much in the past two weeks.

    I need to maintain compatibility of my excel 2003 document that I have
    created. I need it to work on Office 2000 and up. I have read all the posts
    that I can find about “binding” but, I still don’t understand how to use this
    to automatically maintain my files compatibility. How is this code written
    and implemented? If the file is saved, and opened again on an earlier
    version of excel… will it still work?

    I desperately need guidance…

    Thank you for your help in advance!

    ~Josh


  2. #2
    Jim Thomlinson
    Guest

    RE: Maintaining Maximum Platform Compatibility

    There are two aspects to compatibility. One is that Excel has changed over
    the years and new features have been added. This means that code writen for
    the current version of Excel may not work on older versions. You are best off
    to write to the lowest version of Excel possible. The one are that can cuase
    difficulty is code for Pivot Tables as teh Pivot Table Engine changed in
    xl2002 and the code is different for the different versions.

    The other issue (that I thing you are alluding to) is the compatibility of
    references. This gets into early or late binding. Early binding is Selecting
    Tools -> References and binding a reference to your project at design time.
    The other method is late binding where you create your reference to the
    library at run time. Early binding makes the code run a tad faster and it
    allows you to use the intellisence while coding (a very handy feature). Late
    binding has the advantage of not being tied to a specific instance of a
    reference. Check out these two examples...

    Sub EarlyBinding()
    'Must Reference Word Lilbrary (9.0, 10.1, 11.0, ...)
    Dim appWord As Word.Application

    Set appWord = New Word.Application
    appWord.Visible = True
    End Sub

    Sub LateBinding()
    Dim appWord As Object

    Set appWord = CreateObject("Word.Application")
    appWord.Visible = True
    End Sub

    If you can not guranatee which references an end user system will have then
    late binding is great. Speed is not usually too big of an issue with late
    binding. I find the loss of intellisence to be a bit of an issue. I will
    normally reference the project to the library right up front and write my
    code assuming early binding. When the code is up and running I will then
    switch it to late binding (a little bit of rewrite but usually not too bad).
    --
    HTH...

    Jim Thomlinson


    "Bob the Kart Racing fool" wrote:

    > I am just learning about all the issues associated with maintaining
    > compatibility between different software years, discovered when I sent the
    > completed file to my boss for approval… low and behold, a reference error.
    > So now, trying desperately to gather my pride from the floor, I come to you
    > because this forum has helped me so much in the past two weeks.
    >
    > I need to maintain compatibility of my excel 2003 document that I have
    > created. I need it to work on Office 2000 and up. I have read all the posts
    > that I can find about “binding” but, I still don’t understand how to use this
    > to automatically maintain my files compatibility. How is this code written
    > and implemented? If the file is saved, and opened again on an earlier
    > version of excel… will it still work?
    >
    > I desperately need guidance…
    >
    > Thank you for your help in advance!
    >
    > ~Josh
    >


  3. #3
    Bob the Kart Racing fool
    Guest

    RE: Maintaining Maximum Platform Compatibility

    I can't thank you enough for your quick response! I am not using any pivot
    tables in my workbook, so there is no issue there. The part that I'm worried
    about is the VB code that I am using.

    So I will want to use late binding? Because, early binding would
    automatically update to newer versions of a referance and thus cause that
    saved file to stop working on earlier versions, correct?

    So this would solve compatibility issues:

    Sub LateBinding()
    Dim appExcel As Object

    Set appExcel = CreateObject("Excel.Application")
    appExcel.Visible = True
    End Sub

    When would I have LateBinding() exexute? Also, How do I remove Early
    Binding references? I can't simply uncheck thier box... I recieve an error.
    Im guessing this is done through code.

    One last thing... I would like to use User Forms, do I need to reference a
    library for this as well or is that taken care of in the above code?

    Sorry about all of the questions! I'm so used to programming robots...
    thier easy! Just compile the code with the libraries you need and voila,
    working robot

    Thanks again Jim for all your help!

    "Jim Thomlinson" wrote:

    > There are two aspects to compatibility. One is that Excel has changed over
    > the years and new features have been added. This means that code writen for
    > the current version of Excel may not work on older versions. You are best off
    > to write to the lowest version of Excel possible. The one are that can cuase
    > difficulty is code for Pivot Tables as teh Pivot Table Engine changed in
    > xl2002 and the code is different for the different versions.
    >
    > The other issue (that I thing you are alluding to) is the compatibility of
    > references. This gets into early or late binding. Early binding is Selecting
    > Tools -> References and binding a reference to your project at design time.
    > The other method is late binding where you create your reference to the
    > library at run time. Early binding makes the code run a tad faster and it
    > allows you to use the intellisence while coding (a very handy feature). Late
    > binding has the advantage of not being tied to a specific instance of a
    > reference. Check out these two examples...
    >
    > Sub EarlyBinding()
    > 'Must Reference Word Lilbrary (9.0, 10.1, 11.0, ...)
    > Dim appWord As Word.Application
    >
    > Set appWord = New Word.Application
    > appWord.Visible = True
    > End Sub
    >
    > Sub LateBinding()
    > Dim appWord As Object
    >
    > Set appWord = CreateObject("Word.Application")
    > appWord.Visible = True
    > End Sub
    >
    > If you can not guranatee which references an end user system will have then
    > late binding is great. Speed is not usually too big of an issue with late
    > binding. I find the loss of intellisence to be a bit of an issue. I will
    > normally reference the project to the library right up front and write my
    > code assuming early binding. When the code is up and running I will then
    > switch it to late binding (a little bit of rewrite but usually not too bad).
    > --
    > HTH...
    >
    > Jim Thomlinson
    >
    >
    > "Bob the Kart Racing fool" wrote:
    >
    > > I am just learning about all the issues associated with maintaining
    > > compatibility between different software years, discovered when I sent the
    > > completed file to my boss for approval… low and behold, a reference error.
    > > So now, trying desperately to gather my pride from the floor, I come to you
    > > because this forum has helped me so much in the past two weeks.
    > >
    > > I need to maintain compatibility of my excel 2003 document that I have
    > > created. I need it to work on Office 2000 and up. I have read all the posts
    > > that I can find about “binding” but, I still don’t understand how to use this
    > > to automatically maintain my files compatibility. How is this code written
    > > and implemented? If the file is saved, and opened again on an earlier
    > > version of excel… will it still work?
    > >
    > > I desperately need guidance…
    > >
    > > Thank you for your help in advance!
    > >
    > > ~Josh
    > >


  4. #4
    Jim Thomlinson
    Guest

    RE: Maintaining Maximum Platform Compatibility

    Early binding is tied to the exact reference that you select in the
    references list. If the end user does not have that EXACT reference then the
    code crashes (as you have seen). I choose Word because that reference is
    neither backwards nor forwards compatible (ain't that just a kick in the
    shorts). If you have Excel 10 then your reference will (in all likelyhood) be
    Word 10. If you send that to your boss who is on Word 9 or Word 11 then...
    Boom... In this case Late Binding is really the only good option. Late
    binding creates an instance of the Word application. It does not care about
    versions.

    Right now I assume you have choosen some references from the Tools ->
    References list. What you want to do is un-select the references you have
    choosen. Now if you try to compile your code it should crash because you are
    trying to create things that the compiler no longer understand. Where it has
    those issues you want to change to a generic object and then use createobject
    to instantiate the object you require...

    What references do you have that are causing you trouble???
    --
    HTH...

    Jim Thomlinson


    "Bob the Kart Racing fool" wrote:

    > I can't thank you enough for your quick response! I am not using any pivot
    > tables in my workbook, so there is no issue there. The part that I'm worried
    > about is the VB code that I am using.
    >
    > So I will want to use late binding? Because, early binding would
    > automatically update to newer versions of a referance and thus cause that
    > saved file to stop working on earlier versions, correct?
    >
    > So this would solve compatibility issues:
    >
    > Sub LateBinding()
    > Dim appExcel As Object
    >
    > Set appExcel = CreateObject("Excel.Application")
    > appExcel.Visible = True
    > End Sub
    >
    > When would I have LateBinding() exexute? Also, How do I remove Early
    > Binding references? I can't simply uncheck thier box... I recieve an error.
    > Im guessing this is done through code.
    >
    > One last thing... I would like to use User Forms, do I need to reference a
    > library for this as well or is that taken care of in the above code?
    >
    > Sorry about all of the questions! I'm so used to programming robots...
    > thier easy! Just compile the code with the libraries you need and voila,
    > working robot
    >
    > Thanks again Jim for all your help!
    >
    > "Jim Thomlinson" wrote:
    >
    > > There are two aspects to compatibility. One is that Excel has changed over
    > > the years and new features have been added. This means that code writen for
    > > the current version of Excel may not work on older versions. You are best off
    > > to write to the lowest version of Excel possible. The one are that can cuase
    > > difficulty is code for Pivot Tables as teh Pivot Table Engine changed in
    > > xl2002 and the code is different for the different versions.
    > >
    > > The other issue (that I thing you are alluding to) is the compatibility of
    > > references. This gets into early or late binding. Early binding is Selecting
    > > Tools -> References and binding a reference to your project at design time.
    > > The other method is late binding where you create your reference to the
    > > library at run time. Early binding makes the code run a tad faster and it
    > > allows you to use the intellisence while coding (a very handy feature). Late
    > > binding has the advantage of not being tied to a specific instance of a
    > > reference. Check out these two examples...
    > >
    > > Sub EarlyBinding()
    > > 'Must Reference Word Lilbrary (9.0, 10.1, 11.0, ...)
    > > Dim appWord As Word.Application
    > >
    > > Set appWord = New Word.Application
    > > appWord.Visible = True
    > > End Sub
    > >
    > > Sub LateBinding()
    > > Dim appWord As Object
    > >
    > > Set appWord = CreateObject("Word.Application")
    > > appWord.Visible = True
    > > End Sub
    > >
    > > If you can not guranatee which references an end user system will have then
    > > late binding is great. Speed is not usually too big of an issue with late
    > > binding. I find the loss of intellisence to be a bit of an issue. I will
    > > normally reference the project to the library right up front and write my
    > > code assuming early binding. When the code is up and running I will then
    > > switch it to late binding (a little bit of rewrite but usually not too bad).
    > > --
    > > HTH...
    > >
    > > Jim Thomlinson
    > >
    > >
    > > "Bob the Kart Racing fool" wrote:
    > >
    > > > I am just learning about all the issues associated with maintaining
    > > > compatibility between different software years, discovered when I sent the
    > > > completed file to my boss for approval… low and behold, a reference error.
    > > > So now, trying desperately to gather my pride from the floor, I come to you
    > > > because this forum has helped me so much in the past two weeks.
    > > >
    > > > I need to maintain compatibility of my excel 2003 document that I have
    > > > created. I need it to work on Office 2000 and up. I have read all the posts
    > > > that I can find about “binding” but, I still don’t understand how to use this
    > > > to automatically maintain my files compatibility. How is this code written
    > > > and implemented? If the file is saved, and opened again on an earlier
    > > > version of excel… will it still work?
    > > >
    > > > I desperately need guidance…
    > > >
    > > > Thank you for your help in advance!
    > > >
    > > > ~Josh
    > > >


  5. #5
    Bob the Kart Racing fool
    Guest

    RE: Maintaining Maximum Platform Compatibility

    I'm not sure which one is blowing up but I am using the following.... or at
    least I can't uncheck them because it says that they are in use

    Visual Basic for Applications
    Microsoft Excel 11.0 Object Library
    Microsoft Forms 2.0 Object Library

    So I would need to unreference these and then initaite them in my code?

    Thanks again! This is all starting to make some sense!

    ~Josh


    "Jim Thomlinson" wrote:

    > Early binding is tied to the exact reference that you select in the
    > references list. If the end user does not have that EXACT reference then the
    > code crashes (as you have seen). I choose Word because that reference is
    > neither backwards nor forwards compatible (ain't that just a kick in the
    > shorts). If you have Excel 10 then your reference will (in all likelyhood) be
    > Word 10. If you send that to your boss who is on Word 9 or Word 11 then...
    > Boom... In this case Late Binding is really the only good option. Late
    > binding creates an instance of the Word application. It does not care about
    > versions.
    >
    > Right now I assume you have choosen some references from the Tools ->
    > References list. What you want to do is un-select the references you have
    > choosen. Now if you try to compile your code it should crash because you are
    > trying to create things that the compiler no longer understand. Where it has
    > those issues you want to change to a generic object and then use createobject
    > to instantiate the object you require...
    >
    > What references do you have that are causing you trouble???
    > --
    > HTH...
    >
    > Jim Thomlinson
    >
    >
    > "Bob the Kart Racing fool" wrote:
    >
    > > I can't thank you enough for your quick response! I am not using any pivot
    > > tables in my workbook, so there is no issue there. The part that I'm worried
    > > about is the VB code that I am using.
    > >
    > > So I will want to use late binding? Because, early binding would
    > > automatically update to newer versions of a referance and thus cause that
    > > saved file to stop working on earlier versions, correct?
    > >
    > > So this would solve compatibility issues:
    > >
    > > Sub LateBinding()
    > > Dim appExcel As Object
    > >
    > > Set appExcel = CreateObject("Excel.Application")
    > > appExcel.Visible = True
    > > End Sub
    > >
    > > When would I have LateBinding() exexute? Also, How do I remove Early
    > > Binding references? I can't simply uncheck thier box... I recieve an error.
    > > Im guessing this is done through code.
    > >
    > > One last thing... I would like to use User Forms, do I need to reference a
    > > library for this as well or is that taken care of in the above code?
    > >
    > > Sorry about all of the questions! I'm so used to programming robots...
    > > thier easy! Just compile the code with the libraries you need and voila,
    > > working robot
    > >
    > > Thanks again Jim for all your help!
    > >
    > > "Jim Thomlinson" wrote:
    > >
    > > > There are two aspects to compatibility. One is that Excel has changed over
    > > > the years and new features have been added. This means that code writen for
    > > > the current version of Excel may not work on older versions. You are best off
    > > > to write to the lowest version of Excel possible. The one are that can cuase
    > > > difficulty is code for Pivot Tables as teh Pivot Table Engine changed in
    > > > xl2002 and the code is different for the different versions.
    > > >
    > > > The other issue (that I thing you are alluding to) is the compatibility of
    > > > references. This gets into early or late binding. Early binding is Selecting
    > > > Tools -> References and binding a reference to your project at design time.
    > > > The other method is late binding where you create your reference to the
    > > > library at run time. Early binding makes the code run a tad faster and it
    > > > allows you to use the intellisence while coding (a very handy feature). Late
    > > > binding has the advantage of not being tied to a specific instance of a
    > > > reference. Check out these two examples...
    > > >
    > > > Sub EarlyBinding()
    > > > 'Must Reference Word Lilbrary (9.0, 10.1, 11.0, ...)
    > > > Dim appWord As Word.Application
    > > >
    > > > Set appWord = New Word.Application
    > > > appWord.Visible = True
    > > > End Sub
    > > >
    > > > Sub LateBinding()
    > > > Dim appWord As Object
    > > >
    > > > Set appWord = CreateObject("Word.Application")
    > > > appWord.Visible = True
    > > > End Sub
    > > >
    > > > If you can not guranatee which references an end user system will have then
    > > > late binding is great. Speed is not usually too big of an issue with late
    > > > binding. I find the loss of intellisence to be a bit of an issue. I will
    > > > normally reference the project to the library right up front and write my
    > > > code assuming early binding. When the code is up and running I will then
    > > > switch it to late binding (a little bit of rewrite but usually not too bad).
    > > > --
    > > > HTH...
    > > >
    > > > Jim Thomlinson
    > > >
    > > >
    > > > "Bob the Kart Racing fool" wrote:
    > > >
    > > > > I am just learning about all the issues associated with maintaining
    > > > > compatibility between different software years, discovered when I sent the
    > > > > completed file to my boss for approval… low and behold, a reference error.
    > > > > So now, trying desperately to gather my pride from the floor, I come to you
    > > > > because this forum has helped me so much in the past two weeks.
    > > > >
    > > > > I need to maintain compatibility of my excel 2003 document that I have
    > > > > created. I need it to work on Office 2000 and up. I have read all the posts
    > > > > that I can find about “binding” but, I still don’t understand how to use this
    > > > > to automatically maintain my files compatibility. How is this code written
    > > > > and implemented? If the file is saved, and opened again on an earlier
    > > > > version of excel… will it still work?
    > > > >
    > > > > I desperately need guidance…
    > > > >
    > > > > Thank you for your help in advance!
    > > > >
    > > > > ~Josh
    > > > >


  6. #6
    Jim Thomlinson
    Guest

    RE: Maintaining Maximum Platform Compatibility

    If you are programming in Excel then you will have those two references by
    default. You do not need to uncheck either of those. If those are the only
    references in your project then I would suggest that your problem is not one
    of a missing reference. What error do you get when you try to run this on
    various machines? The missing reference error will show up when the code is
    run on a machine without the specific library reference and you will see in
    the list of reference something checked with the work missing beside it,
    something like...

    Missing: Microsoft Word 9.0
    --
    HTH...

    Jim Thomlinson


    "Bob the Kart Racing fool" wrote:

    > I'm not sure which one is blowing up but I am using the following.... or at
    > least I can't uncheck them because it says that they are in use
    >
    > Visual Basic for Applications
    > Microsoft Excel 11.0 Object Library
    > Microsoft Forms 2.0 Object Library
    >
    > So I would need to unreference these and then initaite them in my code?
    >
    > Thanks again! This is all starting to make some sense!
    >
    > ~Josh
    >
    >
    > "Jim Thomlinson" wrote:
    >
    > > Early binding is tied to the exact reference that you select in the
    > > references list. If the end user does not have that EXACT reference then the
    > > code crashes (as you have seen). I choose Word because that reference is
    > > neither backwards nor forwards compatible (ain't that just a kick in the
    > > shorts). If you have Excel 10 then your reference will (in all likelyhood) be
    > > Word 10. If you send that to your boss who is on Word 9 or Word 11 then...
    > > Boom... In this case Late Binding is really the only good option. Late
    > > binding creates an instance of the Word application. It does not care about
    > > versions.
    > >
    > > Right now I assume you have choosen some references from the Tools ->
    > > References list. What you want to do is un-select the references you have
    > > choosen. Now if you try to compile your code it should crash because you are
    > > trying to create things that the compiler no longer understand. Where it has
    > > those issues you want to change to a generic object and then use createobject
    > > to instantiate the object you require...
    > >
    > > What references do you have that are causing you trouble???
    > > --
    > > HTH...
    > >
    > > Jim Thomlinson
    > >
    > >
    > > "Bob the Kart Racing fool" wrote:
    > >
    > > > I can't thank you enough for your quick response! I am not using any pivot
    > > > tables in my workbook, so there is no issue there. The part that I'm worried
    > > > about is the VB code that I am using.
    > > >
    > > > So I will want to use late binding? Because, early binding would
    > > > automatically update to newer versions of a referance and thus cause that
    > > > saved file to stop working on earlier versions, correct?
    > > >
    > > > So this would solve compatibility issues:
    > > >
    > > > Sub LateBinding()
    > > > Dim appExcel As Object
    > > >
    > > > Set appExcel = CreateObject("Excel.Application")
    > > > appExcel.Visible = True
    > > > End Sub
    > > >
    > > > When would I have LateBinding() exexute? Also, How do I remove Early
    > > > Binding references? I can't simply uncheck thier box... I recieve an error.
    > > > Im guessing this is done through code.
    > > >
    > > > One last thing... I would like to use User Forms, do I need to reference a
    > > > library for this as well or is that taken care of in the above code?
    > > >
    > > > Sorry about all of the questions! I'm so used to programming robots...
    > > > thier easy! Just compile the code with the libraries you need and voila,
    > > > working robot
    > > >
    > > > Thanks again Jim for all your help!
    > > >
    > > > "Jim Thomlinson" wrote:
    > > >
    > > > > There are two aspects to compatibility. One is that Excel has changed over
    > > > > the years and new features have been added. This means that code writen for
    > > > > the current version of Excel may not work on older versions. You are best off
    > > > > to write to the lowest version of Excel possible. The one are that can cuase
    > > > > difficulty is code for Pivot Tables as teh Pivot Table Engine changed in
    > > > > xl2002 and the code is different for the different versions.
    > > > >
    > > > > The other issue (that I thing you are alluding to) is the compatibility of
    > > > > references. This gets into early or late binding. Early binding is Selecting
    > > > > Tools -> References and binding a reference to your project at design time.
    > > > > The other method is late binding where you create your reference to the
    > > > > library at run time. Early binding makes the code run a tad faster and it
    > > > > allows you to use the intellisence while coding (a very handy feature). Late
    > > > > binding has the advantage of not being tied to a specific instance of a
    > > > > reference. Check out these two examples...
    > > > >
    > > > > Sub EarlyBinding()
    > > > > 'Must Reference Word Lilbrary (9.0, 10.1, 11.0, ...)
    > > > > Dim appWord As Word.Application
    > > > >
    > > > > Set appWord = New Word.Application
    > > > > appWord.Visible = True
    > > > > End Sub
    > > > >
    > > > > Sub LateBinding()
    > > > > Dim appWord As Object
    > > > >
    > > > > Set appWord = CreateObject("Word.Application")
    > > > > appWord.Visible = True
    > > > > End Sub
    > > > >
    > > > > If you can not guranatee which references an end user system will have then
    > > > > late binding is great. Speed is not usually too big of an issue with late
    > > > > binding. I find the loss of intellisence to be a bit of an issue. I will
    > > > > normally reference the project to the library right up front and write my
    > > > > code assuming early binding. When the code is up and running I will then
    > > > > switch it to late binding (a little bit of rewrite but usually not too bad).
    > > > > --
    > > > > HTH...
    > > > >
    > > > > Jim Thomlinson
    > > > >
    > > > >
    > > > > "Bob the Kart Racing fool" wrote:
    > > > >
    > > > > > I am just learning about all the issues associated with maintaining
    > > > > > compatibility between different software years, discovered when I sent the
    > > > > > completed file to my boss for approval… low and behold, a reference error.
    > > > > > So now, trying desperately to gather my pride from the floor, I come to you
    > > > > > because this forum has helped me so much in the past two weeks.
    > > > > >
    > > > > > I need to maintain compatibility of my excel 2003 document that I have
    > > > > > created. I need it to work on Office 2000 and up. I have read all the posts
    > > > > > that I can find about “binding” but, I still don’t understand how to use this
    > > > > > to automatically maintain my files compatibility. How is this code written
    > > > > > and implemented? If the file is saved, and opened again on an earlier
    > > > > > version of excel… will it still work?
    > > > > >
    > > > > > I desperately need guidance…
    > > > > >
    > > > > > Thank you for your help in advance!
    > > > > >
    > > > > > ~Josh
    > > > > >


  7. #7
    Bob the Kart Racing fool
    Guest

    RE: Maintaining Maximum Platform Compatibility

    I checked my code on the machine it crashed on before and... it now works...
    So now I'm confused. I have't deleted any code. I have addes alot more code
    infact! Well I will try it on some other machines to verify that it does
    indeed work, and post again with the findings.

    So with thoes references there should be any compatibility problems? If
    that is the case and now it works... I guess I don't need to worry about it?
    I'm a little uneasy about my code starting to work.

    Thanks again!

    ~Josh

    "Jim Thomlinson" wrote:

    > If you are programming in Excel then you will have those two references by
    > default. You do not need to uncheck either of those. If those are the only
    > references in your project then I would suggest that your problem is not one
    > of a missing reference. What error do you get when you try to run this on
    > various machines? The missing reference error will show up when the code is
    > run on a machine without the specific library reference and you will see in
    > the list of reference something checked with the work missing beside it,
    > something like...
    >
    > Missing: Microsoft Word 9.0
    > --
    > HTH...
    >
    > Jim Thomlinson
    >
    >
    > "Bob the Kart Racing fool" wrote:
    >
    > > I'm not sure which one is blowing up but I am using the following.... or at
    > > least I can't uncheck them because it says that they are in use
    > >
    > > Visual Basic for Applications
    > > Microsoft Excel 11.0 Object Library
    > > Microsoft Forms 2.0 Object Library
    > >
    > > So I would need to unreference these and then initaite them in my code?
    > >
    > > Thanks again! This is all starting to make some sense!
    > >
    > > ~Josh
    > >
    > >
    > > "Jim Thomlinson" wrote:
    > >
    > > > Early binding is tied to the exact reference that you select in the
    > > > references list. If the end user does not have that EXACT reference then the
    > > > code crashes (as you have seen). I choose Word because that reference is
    > > > neither backwards nor forwards compatible (ain't that just a kick in the
    > > > shorts). If you have Excel 10 then your reference will (in all likelyhood) be
    > > > Word 10. If you send that to your boss who is on Word 9 or Word 11 then...
    > > > Boom... In this case Late Binding is really the only good option. Late
    > > > binding creates an instance of the Word application. It does not care about
    > > > versions.
    > > >
    > > > Right now I assume you have choosen some references from the Tools ->
    > > > References list. What you want to do is un-select the references you have
    > > > choosen. Now if you try to compile your code it should crash because you are
    > > > trying to create things that the compiler no longer understand. Where it has
    > > > those issues you want to change to a generic object and then use createobject
    > > > to instantiate the object you require...
    > > >
    > > > What references do you have that are causing you trouble???
    > > > --
    > > > HTH...
    > > >
    > > > Jim Thomlinson
    > > >
    > > >
    > > > "Bob the Kart Racing fool" wrote:
    > > >
    > > > > I can't thank you enough for your quick response! I am not using any pivot
    > > > > tables in my workbook, so there is no issue there. The part that I'm worried
    > > > > about is the VB code that I am using.
    > > > >
    > > > > So I will want to use late binding? Because, early binding would
    > > > > automatically update to newer versions of a referance and thus cause that
    > > > > saved file to stop working on earlier versions, correct?
    > > > >
    > > > > So this would solve compatibility issues:
    > > > >
    > > > > Sub LateBinding()
    > > > > Dim appExcel As Object
    > > > >
    > > > > Set appExcel = CreateObject("Excel.Application")
    > > > > appExcel.Visible = True
    > > > > End Sub
    > > > >
    > > > > When would I have LateBinding() exexute? Also, How do I remove Early
    > > > > Binding references? I can't simply uncheck thier box... I recieve an error.
    > > > > Im guessing this is done through code.
    > > > >
    > > > > One last thing... I would like to use User Forms, do I need to reference a
    > > > > library for this as well or is that taken care of in the above code?
    > > > >
    > > > > Sorry about all of the questions! I'm so used to programming robots...
    > > > > thier easy! Just compile the code with the libraries you need and voila,
    > > > > working robot
    > > > >
    > > > > Thanks again Jim for all your help!
    > > > >
    > > > > "Jim Thomlinson" wrote:
    > > > >
    > > > > > There are two aspects to compatibility. One is that Excel has changed over
    > > > > > the years and new features have been added. This means that code writen for
    > > > > > the current version of Excel may not work on older versions. You are best off
    > > > > > to write to the lowest version of Excel possible. The one are that can cuase
    > > > > > difficulty is code for Pivot Tables as teh Pivot Table Engine changed in
    > > > > > xl2002 and the code is different for the different versions.
    > > > > >
    > > > > > The other issue (that I thing you are alluding to) is the compatibility of
    > > > > > references. This gets into early or late binding. Early binding is Selecting
    > > > > > Tools -> References and binding a reference to your project at design time.
    > > > > > The other method is late binding where you create your reference to the
    > > > > > library at run time. Early binding makes the code run a tad faster and it
    > > > > > allows you to use the intellisence while coding (a very handy feature). Late
    > > > > > binding has the advantage of not being tied to a specific instance of a
    > > > > > reference. Check out these two examples...
    > > > > >
    > > > > > Sub EarlyBinding()
    > > > > > 'Must Reference Word Lilbrary (9.0, 10.1, 11.0, ...)
    > > > > > Dim appWord As Word.Application
    > > > > >
    > > > > > Set appWord = New Word.Application
    > > > > > appWord.Visible = True
    > > > > > End Sub
    > > > > >
    > > > > > Sub LateBinding()
    > > > > > Dim appWord As Object
    > > > > >
    > > > > > Set appWord = CreateObject("Word.Application")
    > > > > > appWord.Visible = True
    > > > > > End Sub
    > > > > >
    > > > > > If you can not guranatee which references an end user system will have then
    > > > > > late binding is great. Speed is not usually too big of an issue with late
    > > > > > binding. I find the loss of intellisence to be a bit of an issue. I will
    > > > > > normally reference the project to the library right up front and write my
    > > > > > code assuming early binding. When the code is up and running I will then
    > > > > > switch it to late binding (a little bit of rewrite but usually not too bad).
    > > > > > --
    > > > > > HTH...
    > > > > >
    > > > > > Jim Thomlinson
    > > > > >
    > > > > >
    > > > > > "Bob the Kart Racing fool" wrote:
    > > > > >
    > > > > > > I am just learning about all the issues associated with maintaining
    > > > > > > compatibility between different software years, discovered when I sent the
    > > > > > > completed file to my boss for approval… low and behold, a reference error.
    > > > > > > So now, trying desperately to gather my pride from the floor, I come to you
    > > > > > > because this forum has helped me so much in the past two weeks.
    > > > > > >
    > > > > > > I need to maintain compatibility of my excel 2003 document that I have
    > > > > > > created. I need it to work on Office 2000 and up. I have read all the posts
    > > > > > > that I can find about “binding” but, I still don’t understand how to use this
    > > > > > > to automatically maintain my files compatibility. How is this code written
    > > > > > > and implemented? If the file is saved, and opened again on an earlier
    > > > > > > version of excel… will it still work?
    > > > > > >
    > > > > > > I desperately need guidance…
    > > > > > >
    > > > > > > Thank you for your help in advance!
    > > > > > >
    > > > > > > ~Josh
    > > > > > >


  8. #8
    Bob the Kart Racing fool
    Guest

    RE: Maintaining Maximum Platform Compatibility

    I just verified the code on several different computers... including boss
    man's. It worked perfectly on all. So unless the reference problem returns
    I am not going to worry about it. I still can't figure out what has
    changed....

    Thanks a ton for helping me out! I really appreciate it!

    ~Josh

    "Bob the Kart Racing fool" wrote:

    > I checked my code on the machine it crashed on before and... it now works...
    > So now I'm confused. I have't deleted any code. I have addes alot more code
    > infact! Well I will try it on some other machines to verify that it does
    > indeed work, and post again with the findings.
    >
    > So with thoes references there should be any compatibility problems? If
    > that is the case and now it works... I guess I don't need to worry about it?
    > I'm a little uneasy about my code starting to work.
    >
    > Thanks again!
    >
    > ~Josh
    >
    > "Jim Thomlinson" wrote:
    >
    > > If you are programming in Excel then you will have those two references by
    > > default. You do not need to uncheck either of those. If those are the only
    > > references in your project then I would suggest that your problem is not one
    > > of a missing reference. What error do you get when you try to run this on
    > > various machines? The missing reference error will show up when the code is
    > > run on a machine without the specific library reference and you will see in
    > > the list of reference something checked with the work missing beside it,
    > > something like...
    > >
    > > Missing: Microsoft Word 9.0
    > > --
    > > HTH...
    > >
    > > Jim Thomlinson
    > >
    > >
    > > "Bob the Kart Racing fool" wrote:
    > >
    > > > I'm not sure which one is blowing up but I am using the following.... or at
    > > > least I can't uncheck them because it says that they are in use
    > > >
    > > > Visual Basic for Applications
    > > > Microsoft Excel 11.0 Object Library
    > > > Microsoft Forms 2.0 Object Library
    > > >
    > > > So I would need to unreference these and then initaite them in my code?
    > > >
    > > > Thanks again! This is all starting to make some sense!
    > > >
    > > > ~Josh
    > > >
    > > >
    > > > "Jim Thomlinson" wrote:
    > > >
    > > > > Early binding is tied to the exact reference that you select in the
    > > > > references list. If the end user does not have that EXACT reference then the
    > > > > code crashes (as you have seen). I choose Word because that reference is
    > > > > neither backwards nor forwards compatible (ain't that just a kick in the
    > > > > shorts). If you have Excel 10 then your reference will (in all likelyhood) be
    > > > > Word 10. If you send that to your boss who is on Word 9 or Word 11 then...
    > > > > Boom... In this case Late Binding is really the only good option. Late
    > > > > binding creates an instance of the Word application. It does not care about
    > > > > versions.
    > > > >
    > > > > Right now I assume you have choosen some references from the Tools ->
    > > > > References list. What you want to do is un-select the references you have
    > > > > choosen. Now if you try to compile your code it should crash because you are
    > > > > trying to create things that the compiler no longer understand. Where it has
    > > > > those issues you want to change to a generic object and then use createobject
    > > > > to instantiate the object you require...
    > > > >
    > > > > What references do you have that are causing you trouble???
    > > > > --
    > > > > HTH...
    > > > >
    > > > > Jim Thomlinson
    > > > >
    > > > >
    > > > > "Bob the Kart Racing fool" wrote:
    > > > >
    > > > > > I can't thank you enough for your quick response! I am not using any pivot
    > > > > > tables in my workbook, so there is no issue there. The part that I'm worried
    > > > > > about is the VB code that I am using.
    > > > > >
    > > > > > So I will want to use late binding? Because, early binding would
    > > > > > automatically update to newer versions of a referance and thus cause that
    > > > > > saved file to stop working on earlier versions, correct?
    > > > > >
    > > > > > So this would solve compatibility issues:
    > > > > >
    > > > > > Sub LateBinding()
    > > > > > Dim appExcel As Object
    > > > > >
    > > > > > Set appExcel = CreateObject("Excel.Application")
    > > > > > appExcel.Visible = True
    > > > > > End Sub
    > > > > >
    > > > > > When would I have LateBinding() exexute? Also, How do I remove Early
    > > > > > Binding references? I can't simply uncheck thier box... I recieve an error.
    > > > > > Im guessing this is done through code.
    > > > > >
    > > > > > One last thing... I would like to use User Forms, do I need to reference a
    > > > > > library for this as well or is that taken care of in the above code?
    > > > > >
    > > > > > Sorry about all of the questions! I'm so used to programming robots...
    > > > > > thier easy! Just compile the code with the libraries you need and voila,
    > > > > > working robot
    > > > > >
    > > > > > Thanks again Jim for all your help!
    > > > > >
    > > > > > "Jim Thomlinson" wrote:
    > > > > >
    > > > > > > There are two aspects to compatibility. One is that Excel has changed over
    > > > > > > the years and new features have been added. This means that code writen for
    > > > > > > the current version of Excel may not work on older versions. You are best off
    > > > > > > to write to the lowest version of Excel possible. The one are that can cuase
    > > > > > > difficulty is code for Pivot Tables as teh Pivot Table Engine changed in
    > > > > > > xl2002 and the code is different for the different versions.
    > > > > > >
    > > > > > > The other issue (that I thing you are alluding to) is the compatibility of
    > > > > > > references. This gets into early or late binding. Early binding is Selecting
    > > > > > > Tools -> References and binding a reference to your project at design time.
    > > > > > > The other method is late binding where you create your reference to the
    > > > > > > library at run time. Early binding makes the code run a tad faster and it
    > > > > > > allows you to use the intellisence while coding (a very handy feature). Late
    > > > > > > binding has the advantage of not being tied to a specific instance of a
    > > > > > > reference. Check out these two examples...
    > > > > > >
    > > > > > > Sub EarlyBinding()
    > > > > > > 'Must Reference Word Lilbrary (9.0, 10.1, 11.0, ...)
    > > > > > > Dim appWord As Word.Application
    > > > > > >
    > > > > > > Set appWord = New Word.Application
    > > > > > > appWord.Visible = True
    > > > > > > End Sub
    > > > > > >
    > > > > > > Sub LateBinding()
    > > > > > > Dim appWord As Object
    > > > > > >
    > > > > > > Set appWord = CreateObject("Word.Application")
    > > > > > > appWord.Visible = True
    > > > > > > End Sub
    > > > > > >
    > > > > > > If you can not guranatee which references an end user system will have then
    > > > > > > late binding is great. Speed is not usually too big of an issue with late
    > > > > > > binding. I find the loss of intellisence to be a bit of an issue. I will
    > > > > > > normally reference the project to the library right up front and write my
    > > > > > > code assuming early binding. When the code is up and running I will then
    > > > > > > switch it to late binding (a little bit of rewrite but usually not too bad).
    > > > > > > --
    > > > > > > HTH...
    > > > > > >
    > > > > > > Jim Thomlinson
    > > > > > >
    > > > > > >
    > > > > > > "Bob the Kart Racing fool" wrote:
    > > > > > >
    > > > > > > > I am just learning about all the issues associated with maintaining
    > > > > > > > compatibility between different software years, discovered when I sent the
    > > > > > > > completed file to my boss for approval… low and behold, a reference error.
    > > > > > > > So now, trying desperately to gather my pride from the floor, I come to you
    > > > > > > > because this forum has helped me so much in the past two weeks.
    > > > > > > >
    > > > > > > > I need to maintain compatibility of my excel 2003 document that I have
    > > > > > > > created. I need it to work on Office 2000 and up. I have read all the posts
    > > > > > > > that I can find about “binding” but, I still don’t understand how to use this
    > > > > > > > to automatically maintain my files compatibility. How is this code written
    > > > > > > > and implemented? If the file is saved, and opened again on an earlier
    > > > > > > > version of excel… will it still work?
    > > > > > > >
    > > > > > > > I desperately need guidance…
    > > > > > > >
    > > > > > > > Thank you for your help in advance!
    > > > > > > >
    > > > > > > > ~Josh
    > > > > > > >


  9. #9
    Bob the Kart Racing fool
    Guest

    RE: Maintaining Maximum Platform Compatibility

    I just verified the code on several different computers... including boss
    man's. It worked perfectly on all. So unless the reference problem returns
    I am not going to worry about it. I still can't figure out what has
    changed....

    Thanks a ton for helping me out! I really appreciate it!

    ~Josh

    "Bob the Kart Racing fool" wrote:

    > I checked my code on the machine it crashed on before and... it now works...
    > So now I'm confused. I have't deleted any code. I have addes alot more code
    > infact! Well I will try it on some other machines to verify that it does
    > indeed work, and post again with the findings.
    >
    > So with thoes references there should be any compatibility problems? If
    > that is the case and now it works... I guess I don't need to worry about it?
    > I'm a little uneasy about my code starting to work.
    >
    > Thanks again!
    >
    > ~Josh
    >
    > "Jim Thomlinson" wrote:
    >
    > > If you are programming in Excel then you will have those two references by
    > > default. You do not need to uncheck either of those. If those are the only
    > > references in your project then I would suggest that your problem is not one
    > > of a missing reference. What error do you get when you try to run this on
    > > various machines? The missing reference error will show up when the code is
    > > run on a machine without the specific library reference and you will see in
    > > the list of reference something checked with the work missing beside it,
    > > something like...
    > >
    > > Missing: Microsoft Word 9.0
    > > --
    > > HTH...
    > >
    > > Jim Thomlinson
    > >
    > >
    > > "Bob the Kart Racing fool" wrote:
    > >
    > > > I'm not sure which one is blowing up but I am using the following.... or at
    > > > least I can't uncheck them because it says that they are in use
    > > >
    > > > Visual Basic for Applications
    > > > Microsoft Excel 11.0 Object Library
    > > > Microsoft Forms 2.0 Object Library
    > > >
    > > > So I would need to unreference these and then initaite them in my code?
    > > >
    > > > Thanks again! This is all starting to make some sense!
    > > >
    > > > ~Josh
    > > >
    > > >
    > > > "Jim Thomlinson" wrote:
    > > >
    > > > > Early binding is tied to the exact reference that you select in the
    > > > > references list. If the end user does not have that EXACT reference then the
    > > > > code crashes (as you have seen). I choose Word because that reference is
    > > > > neither backwards nor forwards compatible (ain't that just a kick in the
    > > > > shorts). If you have Excel 10 then your reference will (in all likelyhood) be
    > > > > Word 10. If you send that to your boss who is on Word 9 or Word 11 then...
    > > > > Boom... In this case Late Binding is really the only good option. Late
    > > > > binding creates an instance of the Word application. It does not care about
    > > > > versions.
    > > > >
    > > > > Right now I assume you have choosen some references from the Tools ->
    > > > > References list. What you want to do is un-select the references you have
    > > > > choosen. Now if you try to compile your code it should crash because you are
    > > > > trying to create things that the compiler no longer understand. Where it has
    > > > > those issues you want to change to a generic object and then use createobject
    > > > > to instantiate the object you require...
    > > > >
    > > > > What references do you have that are causing you trouble???
    > > > > --
    > > > > HTH...
    > > > >
    > > > > Jim Thomlinson
    > > > >
    > > > >
    > > > > "Bob the Kart Racing fool" wrote:
    > > > >
    > > > > > I can't thank you enough for your quick response! I am not using any pivot
    > > > > > tables in my workbook, so there is no issue there. The part that I'm worried
    > > > > > about is the VB code that I am using.
    > > > > >
    > > > > > So I will want to use late binding? Because, early binding would
    > > > > > automatically update to newer versions of a referance and thus cause that
    > > > > > saved file to stop working on earlier versions, correct?
    > > > > >
    > > > > > So this would solve compatibility issues:
    > > > > >
    > > > > > Sub LateBinding()
    > > > > > Dim appExcel As Object
    > > > > >
    > > > > > Set appExcel = CreateObject("Excel.Application")
    > > > > > appExcel.Visible = True
    > > > > > End Sub
    > > > > >
    > > > > > When would I have LateBinding() exexute? Also, How do I remove Early
    > > > > > Binding references? I can't simply uncheck thier box... I recieve an error.
    > > > > > Im guessing this is done through code.
    > > > > >
    > > > > > One last thing... I would like to use User Forms, do I need to reference a
    > > > > > library for this as well or is that taken care of in the above code?
    > > > > >
    > > > > > Sorry about all of the questions! I'm so used to programming robots...
    > > > > > thier easy! Just compile the code with the libraries you need and voila,
    > > > > > working robot
    > > > > >
    > > > > > Thanks again Jim for all your help!
    > > > > >
    > > > > > "Jim Thomlinson" wrote:
    > > > > >
    > > > > > > There are two aspects to compatibility. One is that Excel has changed over
    > > > > > > the years and new features have been added. This means that code writen for
    > > > > > > the current version of Excel may not work on older versions. You are best off
    > > > > > > to write to the lowest version of Excel possible. The one are that can cuase
    > > > > > > difficulty is code for Pivot Tables as teh Pivot Table Engine changed in
    > > > > > > xl2002 and the code is different for the different versions.
    > > > > > >
    > > > > > > The other issue (that I thing you are alluding to) is the compatibility of
    > > > > > > references. This gets into early or late binding. Early binding is Selecting
    > > > > > > Tools -> References and binding a reference to your project at design time.
    > > > > > > The other method is late binding where you create your reference to the
    > > > > > > library at run time. Early binding makes the code run a tad faster and it
    > > > > > > allows you to use the intellisence while coding (a very handy feature). Late
    > > > > > > binding has the advantage of not being tied to a specific instance of a
    > > > > > > reference. Check out these two examples...
    > > > > > >
    > > > > > > Sub EarlyBinding()
    > > > > > > 'Must Reference Word Lilbrary (9.0, 10.1, 11.0, ...)
    > > > > > > Dim appWord As Word.Application
    > > > > > >
    > > > > > > Set appWord = New Word.Application
    > > > > > > appWord.Visible = True
    > > > > > > End Sub
    > > > > > >
    > > > > > > Sub LateBinding()
    > > > > > > Dim appWord As Object
    > > > > > >
    > > > > > > Set appWord = CreateObject("Word.Application")
    > > > > > > appWord.Visible = True
    > > > > > > End Sub
    > > > > > >
    > > > > > > If you can not guranatee which references an end user system will have then
    > > > > > > late binding is great. Speed is not usually too big of an issue with late
    > > > > > > binding. I find the loss of intellisence to be a bit of an issue. I will
    > > > > > > normally reference the project to the library right up front and write my
    > > > > > > code assuming early binding. When the code is up and running I will then
    > > > > > > switch it to late binding (a little bit of rewrite but usually not too bad).
    > > > > > > --
    > > > > > > HTH...
    > > > > > >
    > > > > > > Jim Thomlinson
    > > > > > >
    > > > > > >
    > > > > > > "Bob the Kart Racing fool" wrote:
    > > > > > >
    > > > > > > > I am just learning about all the issues associated with maintaining
    > > > > > > > compatibility between different software years, discovered when I sent the
    > > > > > > > completed file to my boss for approval… low and behold, a reference error.
    > > > > > > > So now, trying desperately to gather my pride from the floor, I come to you
    > > > > > > > because this forum has helped me so much in the past two weeks.
    > > > > > > >
    > > > > > > > I need to maintain compatibility of my excel 2003 document that I have
    > > > > > > > created. I need it to work on Office 2000 and up. I have read all the posts
    > > > > > > > that I can find about “binding” but, I still don’t understand how to use this
    > > > > > > > to automatically maintain my files compatibility. How is this code written
    > > > > > > > and implemented? If the file is saved, and opened again on an earlier
    > > > > > > > version of excel… will it still work?
    > > > > > > >
    > > > > > > > I desperately need guidance…
    > > > > > > >
    > > > > > > > Thank you for your help in advance!
    > > > > > > >
    > > > > > > > ~Josh
    > > > > > > >


  10. #10
    Bob the Kart Racing fool
    Guest

    RE: Maintaining Maximum Platform Compatibility

    I just verified the code on several different computers... including boss
    man's. It worked perfectly on all. So unless the reference problem returns
    I am not going to worry about it. I still can't figure out what has
    changed....

    Thanks a ton for helping me out! I really appreciate it!

    ~Josh

    "Bob the Kart Racing fool" wrote:

    > I checked my code on the machine it crashed on before and... it now works...
    > So now I'm confused. I have't deleted any code. I have addes alot more code
    > infact! Well I will try it on some other machines to verify that it does
    > indeed work, and post again with the findings.
    >
    > So with thoes references there should be any compatibility problems? If
    > that is the case and now it works... I guess I don't need to worry about it?
    > I'm a little uneasy about my code starting to work.
    >
    > Thanks again!
    >
    > ~Josh
    >
    > "Jim Thomlinson" wrote:
    >
    > > If you are programming in Excel then you will have those two references by
    > > default. You do not need to uncheck either of those. If those are the only
    > > references in your project then I would suggest that your problem is not one
    > > of a missing reference. What error do you get when you try to run this on
    > > various machines? The missing reference error will show up when the code is
    > > run on a machine without the specific library reference and you will see in
    > > the list of reference something checked with the work missing beside it,
    > > something like...
    > >
    > > Missing: Microsoft Word 9.0
    > > --
    > > HTH...
    > >
    > > Jim Thomlinson
    > >
    > >
    > > "Bob the Kart Racing fool" wrote:
    > >
    > > > I'm not sure which one is blowing up but I am using the following.... or at
    > > > least I can't uncheck them because it says that they are in use
    > > >
    > > > Visual Basic for Applications
    > > > Microsoft Excel 11.0 Object Library
    > > > Microsoft Forms 2.0 Object Library
    > > >
    > > > So I would need to unreference these and then initaite them in my code?
    > > >
    > > > Thanks again! This is all starting to make some sense!
    > > >
    > > > ~Josh
    > > >
    > > >
    > > > "Jim Thomlinson" wrote:
    > > >
    > > > > Early binding is tied to the exact reference that you select in the
    > > > > references list. If the end user does not have that EXACT reference then the
    > > > > code crashes (as you have seen). I choose Word because that reference is
    > > > > neither backwards nor forwards compatible (ain't that just a kick in the
    > > > > shorts). If you have Excel 10 then your reference will (in all likelyhood) be
    > > > > Word 10. If you send that to your boss who is on Word 9 or Word 11 then...
    > > > > Boom... In this case Late Binding is really the only good option. Late
    > > > > binding creates an instance of the Word application. It does not care about
    > > > > versions.
    > > > >
    > > > > Right now I assume you have choosen some references from the Tools ->
    > > > > References list. What you want to do is un-select the references you have
    > > > > choosen. Now if you try to compile your code it should crash because you are
    > > > > trying to create things that the compiler no longer understand. Where it has
    > > > > those issues you want to change to a generic object and then use createobject
    > > > > to instantiate the object you require...
    > > > >
    > > > > What references do you have that are causing you trouble???
    > > > > --
    > > > > HTH...
    > > > >
    > > > > Jim Thomlinson
    > > > >
    > > > >
    > > > > "Bob the Kart Racing fool" wrote:
    > > > >
    > > > > > I can't thank you enough for your quick response! I am not using any pivot
    > > > > > tables in my workbook, so there is no issue there. The part that I'm worried
    > > > > > about is the VB code that I am using.
    > > > > >
    > > > > > So I will want to use late binding? Because, early binding would
    > > > > > automatically update to newer versions of a referance and thus cause that
    > > > > > saved file to stop working on earlier versions, correct?
    > > > > >
    > > > > > So this would solve compatibility issues:
    > > > > >
    > > > > > Sub LateBinding()
    > > > > > Dim appExcel As Object
    > > > > >
    > > > > > Set appExcel = CreateObject("Excel.Application")
    > > > > > appExcel.Visible = True
    > > > > > End Sub
    > > > > >
    > > > > > When would I have LateBinding() exexute? Also, How do I remove Early
    > > > > > Binding references? I can't simply uncheck thier box... I recieve an error.
    > > > > > Im guessing this is done through code.
    > > > > >
    > > > > > One last thing... I would like to use User Forms, do I need to reference a
    > > > > > library for this as well or is that taken care of in the above code?
    > > > > >
    > > > > > Sorry about all of the questions! I'm so used to programming robots...
    > > > > > thier easy! Just compile the code with the libraries you need and voila,
    > > > > > working robot
    > > > > >
    > > > > > Thanks again Jim for all your help!
    > > > > >
    > > > > > "Jim Thomlinson" wrote:
    > > > > >
    > > > > > > There are two aspects to compatibility. One is that Excel has changed over
    > > > > > > the years and new features have been added. This means that code writen for
    > > > > > > the current version of Excel may not work on older versions. You are best off
    > > > > > > to write to the lowest version of Excel possible. The one are that can cuase
    > > > > > > difficulty is code for Pivot Tables as teh Pivot Table Engine changed in
    > > > > > > xl2002 and the code is different for the different versions.
    > > > > > >
    > > > > > > The other issue (that I thing you are alluding to) is the compatibility of
    > > > > > > references. This gets into early or late binding. Early binding is Selecting
    > > > > > > Tools -> References and binding a reference to your project at design time.
    > > > > > > The other method is late binding where you create your reference to the
    > > > > > > library at run time. Early binding makes the code run a tad faster and it
    > > > > > > allows you to use the intellisence while coding (a very handy feature). Late
    > > > > > > binding has the advantage of not being tied to a specific instance of a
    > > > > > > reference. Check out these two examples...
    > > > > > >
    > > > > > > Sub EarlyBinding()
    > > > > > > 'Must Reference Word Lilbrary (9.0, 10.1, 11.0, ...)
    > > > > > > Dim appWord As Word.Application
    > > > > > >
    > > > > > > Set appWord = New Word.Application
    > > > > > > appWord.Visible = True
    > > > > > > End Sub
    > > > > > >
    > > > > > > Sub LateBinding()
    > > > > > > Dim appWord As Object
    > > > > > >
    > > > > > > Set appWord = CreateObject("Word.Application")
    > > > > > > appWord.Visible = True
    > > > > > > End Sub
    > > > > > >
    > > > > > > If you can not guranatee which references an end user system will have then
    > > > > > > late binding is great. Speed is not usually too big of an issue with late
    > > > > > > binding. I find the loss of intellisence to be a bit of an issue. I will
    > > > > > > normally reference the project to the library right up front and write my
    > > > > > > code assuming early binding. When the code is up and running I will then
    > > > > > > switch it to late binding (a little bit of rewrite but usually not too bad).
    > > > > > > --
    > > > > > > HTH...
    > > > > > >
    > > > > > > Jim Thomlinson
    > > > > > >
    > > > > > >
    > > > > > > "Bob the Kart Racing fool" wrote:
    > > > > > >
    > > > > > > > I am just learning about all the issues associated with maintaining
    > > > > > > > compatibility between different software years, discovered when I sent the
    > > > > > > > completed file to my boss for approval… low and behold, a reference error.
    > > > > > > > So now, trying desperately to gather my pride from the floor, I come to you
    > > > > > > > because this forum has helped me so much in the past two weeks.
    > > > > > > >
    > > > > > > > I need to maintain compatibility of my excel 2003 document that I have
    > > > > > > > created. I need it to work on Office 2000 and up. I have read all the posts
    > > > > > > > that I can find about “binding” but, I still don’t understand how to use this
    > > > > > > > to automatically maintain my files compatibility. How is this code written
    > > > > > > > and implemented? If the file is saved, and opened again on an earlier
    > > > > > > > version of excel… will it still work?
    > > > > > > >
    > > > > > > > I desperately need guidance…
    > > > > > > >
    > > > > > > > Thank you for your help in advance!
    > > > > > > >
    > > > > > > > ~Josh
    > > > > > > >


+ 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