Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Determining whether a workbook is a 2003 or 2007 workbook

Hi,

Since users can resave a workbook in .xlsx format, is there a recommended
way of determining whether a workbook supports 2007's increased rows and
columns? I display a warning when the user tries to display something
greater than the max columns or rows and checking the Application.Version
only works when the user opens
a. Excel 2003 application and 2003 workbook
b. Excel 2003 application and 2007 workbook
c. Excel 2007 application and 2003 workbook

I would like to handle the case where the workbook imposes the smaller limit.
d. Excel 2007 application and 2003 workbook

Is there a better method than checking the file extension?

Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,420
Default Determining whether a workbook is a 2003 or 2007 workbook

Check the Rows.Count property, if it is greater than 100,000 then it is
2007!

--
__________________________________
HTH

Bob

"sleepp" wrote in message
...
Hi,

Since users can resave a workbook in .xlsx format, is there a recommended
way of determining whether a workbook supports 2007's increased rows and
columns? I display a warning when the user tries to display something
greater than the max columns or rows and checking the Application.Version
only works when the user opens
a. Excel 2003 application and 2003 workbook
b. Excel 2003 application and 2007 workbook
c. Excel 2007 application and 2003 workbook

I would like to handle the case where the workbook imposes the smaller
limit.
d. Excel 2007 application and 2003 workbook

Is there a better method than checking the file extension?

Thanks!



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Determining whether a workbook is a 2003 or 2007 workbook

Genius! I never knew that worked.
Thanks!

"Bob Phillips" wrote:

Check the Rows.Count property, if it is greater than 100,000 then it is
2007!

--
__________________________________
HTH

Bob

"sleepp" wrote in message
...
Hi,

Since users can resave a workbook in .xlsx format, is there a recommended
way of determining whether a workbook supports 2007's increased rows and
columns? I display a warning when the user tries to display something
greater than the max columns or rows and checking the Application.Version
only works when the user opens
a. Excel 2003 application and 2003 workbook
b. Excel 2003 application and 2007 workbook
c. Excel 2007 application and 2003 workbook

I would like to handle the case where the workbook imposes the smaller
limit.
d. Excel 2007 application and 2003 workbook

Is there a better method than checking the file extension?

Thanks!




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 449
Default Determining whether a workbook is a 2003 or 2007 workbook

Hi friends

Our company has set xls as default file format in Excel2007 -this is to
avoid ignorant users sending xlsx files to users with older versions.
Skilled users can change default and do whatever.
Behavious of Excel is: Open a new file, it has 65k rows. SaveAs xlsx or
xlsm, it still has 65k rows, it goes into "compatibility mode". Here is
where rows.count will fail. Close the file and reopen, voila a million +
rows.

Best wishes Harald

"Bob Phillips" wrote in message
...
Check the Rows.Count property, if it is greater than 100,000 then it is
2007!

--
__________________________________
HTH

Bob

"sleepp" wrote in message
...
Hi,

Since users can resave a workbook in .xlsx format, is there a recommended
way of determining whether a workbook supports 2007's increased rows and
columns? I display a warning when the user tries to display something
greater than the max columns or rows and checking the Application.Version
only works when the user opens
a. Excel 2003 application and 2003 workbook
b. Excel 2003 application and 2007 workbook
c. Excel 2007 application and 2003 workbook

I would like to handle the case where the workbook imposes the smaller
limit.
d. Excel 2007 application and 2003 workbook

Is there a better method than checking the file extension?

Thanks!




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Determining whether a workbook is a 2003 or 2007 workbook

You can check the file format

Start here
http://www.rondebruin.nl/saveas.htm

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"sleepp" wrote in message ...
Hi,

Since users can resave a workbook in .xlsx format, is there a recommended
way of determining whether a workbook supports 2007's increased rows and
columns? I display a warning when the user tries to display something
greater than the max columns or rows and checking the Application.Version
only works when the user opens
a. Excel 2003 application and 2003 workbook
b. Excel 2003 application and 2007 workbook
c. Excel 2007 application and 2003 workbook

I would like to handle the case where the workbook imposes the smaller limit.
d. Excel 2007 application and 2003 workbook

Is there a better method than checking the file extension?

Thanks!



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Determining whether a workbook is a 2003 or 2007 workbook

Can't you just check any worksheets Row.Count and/or Columns.Count property
to test the maximum limits?

MsgBox Worksheets(1).Rows.Count, Worksheets(1).Columns.Count

--
Rick (MVP - Excel)


"sleepp" wrote in message
...
Hi,

Since users can resave a workbook in .xlsx format, is there a recommended
way of determining whether a workbook supports 2007's increased rows and
columns? I display a warning when the user tries to display something
greater than the max columns or rows and checking the Application.Version
only works when the user opens
a. Excel 2003 application and 2003 workbook
b. Excel 2003 application and 2007 workbook
c. Excel 2007 application and 2003 workbook

I would like to handle the case where the workbook imposes the smaller
limit.
d. Excel 2007 application and 2003 workbook

Is there a better method than checking the file extension?

Thanks!


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Determining whether a workbook is a 2003 or 2007 workbook

you can check for workbook.fileformat (see the help on XlFileFormat for the
different versions) and check the application.version

regards,

Jurgen


"sleepp" wrote in message
...
Hi,

Since users can resave a workbook in .xlsx format, is there a recommended
way of determining whether a workbook supports 2007's increased rows and
columns? I display a warning when the user tries to display something
greater than the max columns or rows and checking the Application.Version
only works when the user opens
a. Excel 2003 application and 2003 workbook
b. Excel 2003 application and 2007 workbook
c. Excel 2007 application and 2003 workbook

I would like to handle the case where the workbook imposes the smaller
limit.
d. Excel 2007 application and 2003 workbook

Is there a better method than checking the file extension?

Thanks!


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
2007 workbook for 2003 client cyberfreak Excel Discussion (Misc queries) 1 February 7th 09 12:55 AM
excell workbook 2007 to 2003 cyberfreak Excel Discussion (Misc queries) 0 February 6th 09 05:38 PM
Color Changes When Saving 2007 Workbook as 97 - 2003 Workbook Don Excel Discussion (Misc queries) 0 April 20th 08 04:51 AM
Using a workbook from 2003 in 2007 fda secretary Excel Discussion (Misc queries) 2 October 17th 07 07:33 PM
Copy Data from Excel 2007 XLSM workbook to Excel 2003 XLS workbook using ADO Andy Excel Programming 2 July 27th 07 10:44 PM


All times are GMT +1. The time now is 03:55 PM.

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"