From: Helmut Meukel on 17 Mar 2010 19:24 Hmm, in your VB6 program you have reverenced something like EXCEL10.OLB, the excel object library. You may run into problems when the excel version installed on the target system is older. A few days ago I upgraded an app on a custumers system with only Office 97. So I searched on my multi-boot dev system for EXCEL8.OLB, found it on one of the other system partitions and refereced it. The compiled exe had no problem on my system with Office 2000. As I later tried a small test app, I found in References only EXCEL9.OLB and had to browse for EXCEL8.OLB, so it will probably work with higher versions. I found somewhere a tip to use early binding during development to have the benefit of intellisense but then switch to late binding to be on the safe side and use trial and error to create the excel object. Starting with the highest version and then down to the oldest version that still supports the essential things you used and skip over non-essential features if there is only an old Excel version available. You could do this using conditional compilation so you can switch back to early binding for further development. Helmut. "freedom" <user(a)msgroups.net/> schrieb im Newsbeitrag news:%23wcaxv9wKHA.3304(a)TK2MSFTNGP06.phx.gbl... >I wrote a code in VB6�s > ~~ > Set xlapp = CreateObject("excel.application") > xlapp.Visible = True > Set xlbook = xlapp.workbooks.open("C:\a.xls") > Set xlsheet = xlbook.worksheets(1) > xlsheet.Activate > ~~ > It can run in my computer. > When I used the VB program and excel file in other computer, it show a > message�s > ~~ > Run time error 40036 > Application-defined or Object-defined error > ~~ > > I don't know what can I do. > I need use the VB program and the excel file in any other computers.(the excel > file have some VBA program). > > I had made the VB program to .exe file. I think maybe the problem is other > computer doesn't install VB6 ?? I made the excel file in excel 2003,but it > can't run in excel 2007 ?? > > thanks a lot > > > > --- > frmsrcurl: http://msgroups.net/microsoft.public.vb.general.discussion
|
Pages: 1 Prev: Listbox with icons? Next: What do you folks use to create icons? |