Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
2003/2007
The following works fine except when one is using 2007 in compatibility mode. Is there a better VBA test than "VBA Application.VERSION = "12.0" to force MaxRows and MaxColumns to the older limits if one is in compatibility mode? If Application.VERSION = "12.0" Then MaxRows = 1048576 - 1 MaxColumns = 16384 - 1 Else MaxRows = 65536 - 1 MaxColumns = 256 - 1 End If TIA |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I think I'd use something like:
With worksheets(1) maxrows = .rows.count maxcolumns = .columns.count end with I'm not sure why you're subtracting one, though. wrote: 2003/2007 The following works fine except when one is using 2007 in compatibility mode. Is there a better VBA test than "VBA Application.VERSION = "12.0" to force MaxRows and MaxColumns to the older limits if one is in compatibility mode? If Application.VERSION = "12.0" Then MaxRows = 1048576 - 1 MaxColumns = 16384 - 1 Else MaxRows = 65536 - 1 MaxColumns = 256 - 1 End If TIA -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
The -1 should have been deleted for this query.
Thanks Dave Dave Peterson wrote: I think I'd use something like: With worksheets(1) maxrows = .rows.count maxcolumns = .columns.count end with I'm not sure why you're subtracting one, though. wrote: 2003/2007 The following works fine except when one is using 2007 in compatibility mode. Is there a better VBA test than "VBA Application.VERSION = "12.0" to force MaxRows and MaxColumns to the older limits if one is in compatibility mode? If Application.VERSION = "12.0" Then MaxRows = 1048576 - 1 MaxColumns = 16384 - 1 Else MaxRows = 65536 - 1 MaxColumns = 256 - 1 End If TIA |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
2003/2007 Compatibility Question | Excel Discussion (Misc queries) | |||
backwards compatibility for Excel 2007 | Excel Discussion (Misc queries) | |||
Excel 2007 and "Compatibility Mode" | Excel Discussion (Misc queries) | |||
What does compatibility mode mean | Setting up and Configuration of Excel | |||
compatibility of XL 2007 with openoffice 2.0 | Excel Discussion (Misc queries) |