open Excel 2003 app from Excel 2010 macro

Alli

New Member
Joined
May 25, 2010
Messages
25
Hello
Because Excel 2010 can't save DBF format files, I though I could work around that by opening from the working file's macro an instance of Excel 2003. I more-or-less seem to have done that using:

Dim xlApp As Excel.Application
Set xlApp = CreateObject("Excel.Application.11")
'''
xlApp.Workbooks.Open Filename:=FileString, UpdateLinks:=0
Set PESdbf = xlApp.ActiveWorkbook
etc
''
However, once I need to start writing to the file, I can't seem to find a way to make it the active workbook. (I have, of course tried PESdbf.activate)

Has anyone any suggestions?

Thank you
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
FYI, CreateObject simply uses the default version of Excel regardless of what you specify in the version number. The only guaranteed way to get the version you want is to Shell it. For example, on my PC at work:
Code:
?createobject("Excel.Application.11").version
returns 14.0
 
Upvote 0
Thank you Derek and Rorya-you've clarified what I was beginning to suspect. The strange thing was that the Excel icon that popped up when I opened the dbf file in the new 'instance' of excel looked like the 2003 icon, but was in fact, as you point out Rorya, 2010 anyway.
I worked out a way I could write to that file (in the other 'instance' of excel that was 2010 not 2003 as I'd wanted) and also changed the named range for the database to include the new columns, but because it was still 2010 I couldn't save it as .dbf anyway. Grr.
Thanks for the link Derek, I will have a look and report back if there is anything useful.
Regards
 
Upvote 0

Forum statistics

Threads
1,223,237
Messages
6,170,928
Members
452,366
Latest member
TePunaBloke

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top