Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Excel.Workbooks.Open behaviors differently in VBA and VB

I have a xml based excel file (.xlsx). In VBA editor inside excel, if I put
Workgbooks.Open "abc.xlsx", it will load the file correctly in spreadsheet
format. However, in a standalone vb application, if I put the same statement,
Excel will open the file in text format.
Any idea why this is happening and how to fix it?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Excel.Workbooks.Open behaviors differently in VBA and VB

Please ignore this issue. I found that in VB I am using .xls. Changing it to
..xlsx will solve the problem.


"giantdino" wrote:

I have a xml based excel file (.xlsx). In VBA editor inside excel, if I put
Workgbooks.Open "abc.xlsx", it will load the file correctly in spreadsheet
format. However, in a standalone vb application, if I put the same statement,
Excel will open the file in text format.
Any idea why this is happening and how to fix it?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA Excel.WorkBooks.Open can't open an XML format xls file giantdino Excel Programming 2 August 14th 07 03:12 PM
When I open Excel, workbooks open automatically. How can I stop t Rhealbird Excel Discussion (Misc queries) 2 February 23rd 06 10:08 AM
workbooks.open function fails to open an existing excel file when used in ASP, but works in VB. san Excel Programming 1 January 3rd 06 03:22 AM
open Excel formatted differently than the default format Chip Excel Discussion (Misc queries) 1 November 20th 05 10:38 PM
Excel 2003 Workbooks.Open with CorruptLoad=xlRepairFile fails on Excel 5.0/95 file due to Chart, with Error 1004 Method 'Open' of object 'Workbooks' failed Frank Jones Excel Programming 2 June 15th 04 03:21 AM


All times are GMT +1. The time now is 07:32 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"