Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() hi, i have macro that works on 2003, in run time, it opens an excel file, made some changes and should save. i need the same macro to run on 2003 and 2007, and save the file in .xls(in 2003) or .xlm(in 2007). how should i recognize if i'm in 2007 or 2003 via the code? and how should i re write the following code that was only for 2003: ActiveSheet.SaveAs FileName:=ModelPath & "\" & "Service Request " & ".xls" thanks, -- Miri Tz. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
i have macro that works on 2003, in run time, it opens an excel file, made
some changes and should save. i need the same macro to run on 2003 and 2007, and save the file in .xls(in 2003) or .xlm(in 2007). how should i recognize if i'm in 2007 or 2003 via the code? If Application.Version = "11.0" Then MsgBox "Using XL2003 ElseIf Application.Version = "12.0" Then MsgBox "Using XL2007" Else MsgBox "Not using either XL2003 nor XL2007" End If Rick |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Can I just use that to say if version 11 save as xls else if version save as
xlm (or xlsm?)? "Rick Rothstein (MVP - VB)" wrote: i have macro that works on 2003, in run time, it opens an excel file, made some changes and should save. i need the same macro to run on 2003 and 2007, and save the file in .xls(in 2003) or .xlm(in 2007). how should i recognize if i'm in 2007 or 2003 via the code? If Application.Version = "11.0" Then MsgBox "Using XL2003 ElseIf Application.Version = "12.0" Then MsgBox "Using XL2007" Else MsgBox "Not using either XL2003 nor XL2007" End If Rick |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Debbie
See http://www.rondebruin.nl/saveas.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Debbie Horner" wrote in message ... Can I just use that to say if version 11 save as xls else if version save as xlm (or xlsm?)? "Rick Rothstein (MVP - VB)" wrote: i have macro that works on 2003, in run time, it opens an excel file, made some changes and should save. i need the same macro to run on 2003 and 2007, and save the file in .xls(in 2003) or .xlm(in 2007). how should i recognize if i'm in 2007 or 2003 via the code? If Application.Version = "11.0" Then MsgBox "Using XL2003 ElseIf Application.Version = "12.0" Then MsgBox "Using XL2007" Else MsgBox "Not using either XL2003 nor XL2007" End If Rick |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel opens two windows (2007 & 2003 format): I want only 2003. | Excel Discussion (Misc queries) | |||
Saving from 2007 to 2003 - 2003 won't open the file | Excel Discussion (Misc queries) | |||
visual basic code in 2003 vs 2007 | Excel Discussion (Misc queries) | |||
Why can't I sort a 2003 file in 2007? 2007 freezes. | Excel Discussion (Misc queries) | |||
2007 & 2003 - Default open with 2003 | Excel Discussion (Misc queries) |