Microsoft Office
--
Questions
--
Followers
Top Experts
How can you make an excel add-in that can work on both Office 2000 and Office XP?
I have one that I developed in Office 2000, but how can I get it to work in Office XP, does it
to know what library file to references or do you distribute excel9.olb and the add-in just
uses that even though Office XP uses excel.olb.
LittlePerson
Zero AI Policy
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
I see what you mean.
I just installed Office XP and ran the app and it worked. Apart from the custom toolbars
I have are displayed in the wrong order. Not a big problem and the rest seems to work
OK apart from an annoying little "Type a question for help" combobox which has appeared
on the right hand side of my custom menu - Can you switch this off?
Thanks for the link I think I will have to look into late binding a little more.
One thing though - how if the app has a reference to excel9.olb can it work!
I searched my hard drive to be sure and no excel9.olb.
Thanks again
LittlePerson
object as that doesn't seem to work unless you declare it as an object.
dim xl as excel.application
late binding is without a reference to any dll and uses declarations like
dim xl as object
or
dim xl
leaving it to the application to find the object to use
you cannot use dim worksheets as object because worksheets is a reserved word within the excel application you can do something like
dim wsh as worksheets
dim ws as worksheet
for each ws in wsh
 'do your thing
next






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
I appreciate that and that is what I was trying to say. I am using early binding so I
have a reference to the type library for excel9.olb
The only object I declare is for the worksheets object, i.e.
Dim xlWkShts As Object
As it the add-ins don't seem to like declaring it as excel.Worksheets
eveything else is early binding
Dim xlWkSht As Excel.Worksheet
So my question then was given that excel9.olb is no where to be found on the machine. The app
still runs on Office XP. I was just a little puzzled as to how this could work. Maybe I am not
understanding.
Thanks for the reply
LittlePerson
- suspecting that the excel xp is backwards compatible with the excel9.olb that would make sense since there is only functionality added in a version upward
- i would always use late binding it is bit slower but you got no worry about which version of excel is installed on the client
find the links (I pressume thats what you meant "2 things can't find it right now") I would be
most grateful. I think Late binding could be the way forward though.
Thanks again for the answers.
Kind Regards
LittlePerson

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
Microsoft Office
--
Questions
--
Followers
Top Experts
Microsoft Office is an integrated suite of applications that includes Outlook, Word, Excel, Access, PowerPoint, Visio and InfoPath, along with a number of tools to assist in making the individual components work together. Coding within and between the projects is done in Visual Basic for Applications, known as VBA.