Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 94
Default 2007 Excel vs. 2003

Good Afternoon,

I'm trying to switch a spreadsheet with Programming/Macros from Office 2003
to 2007 . I'm having some compatibility issues and I'm hoping someone can
help.

In Excel 2003, if you had Text Fields or Shapes and were sending to a new
workbook, these were automatically ported over (meaning you'd have to program
in a logic if you didn't want them to show up the new worksheet). I'm hoping
to continue that working in Office 2007 but that doesn't appear to be the
case. Since I have so many Text Fields and shapes I'm carrying over to the
unformatted worksheet, I'm hoping there is a solution (vs. referencing all
fields) to have it carry these over automatically.

I'm writing from an existing workbook to a new sheet and below is the code.
I have to keep the doc in XLS form even though I'm working in 2007 Excel
(some users are still on 2003). When use the routine below from Excel 2007,
it will not bring the fields over and half of the page appears blank since
Excel 2003 automatically brings them over.

Any thoughts on a quick fix?

Thank you in advance - Jenny B.


Sub Finalstop()

Dim myPath As String
Dim nRng As Range
Dim fName As String
Set nRng = Range("F64")

ActiveSheet.Copy

myPath = "I:\Document Management\Print management\Operations\B55
Docs\B55 Testing Checklist\"
fName = nRng.Value & ".xls"

ActiveWorkbook.SaveAs Filename:= _
myPath & fName, FileFormat:= _
xlNormal, Password:="", _
WriteResPassword:="", _
ReadOnlyRecommended:=False, _
CreateBackup:=False
ActiveWorkbook.Close
ActiveSheet.Visible = False

End Sub
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default 2007 Excel vs. 2003

If you're running in both Excel 2007 and 2003 and need to have different code
for each, do something like this

If Val(Application.Version) = 12 then
'Excel 2007 code
else
'Excel 2003 code
end if
--
HTH,

Barb Reinhardt



"Jenny B." wrote:

Good Afternoon,

I'm trying to switch a spreadsheet with Programming/Macros from Office 2003
to 2007 . I'm having some compatibility issues and I'm hoping someone can
help.

In Excel 2003, if you had Text Fields or Shapes and were sending to a new
workbook, these were automatically ported over (meaning you'd have to program
in a logic if you didn't want them to show up the new worksheet). I'm hoping
to continue that working in Office 2007 but that doesn't appear to be the
case. Since I have so many Text Fields and shapes I'm carrying over to the
unformatted worksheet, I'm hoping there is a solution (vs. referencing all
fields) to have it carry these over automatically.

I'm writing from an existing workbook to a new sheet and below is the code.
I have to keep the doc in XLS form even though I'm working in 2007 Excel
(some users are still on 2003). When use the routine below from Excel 2007,
it will not bring the fields over and half of the page appears blank since
Excel 2003 automatically brings them over.

Any thoughts on a quick fix?

Thank you in advance - Jenny B.


Sub Finalstop()

Dim myPath As String
Dim nRng As Range
Dim fName As String
Set nRng = Range("F64")

ActiveSheet.Copy

myPath = "I:\Document Management\Print management\Operations\B55
Docs\B55 Testing Checklist\"
fName = nRng.Value & ".xls"

ActiveWorkbook.SaveAs Filename:= _
myPath & fName, FileFormat:= _
xlNormal, Password:="", _
WriteResPassword:="", _
ReadOnlyRecommended:=False, _
CreateBackup:=False
ActiveWorkbook.Close
ActiveSheet.Visible = False

End Sub

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 94
Default 2007 Excel vs. 2003

Hi Barb,

Thank you so very much. I will just change up the code to the Else
Statement you provided to accommodate both versions. I was just hoping there
would be an easier way without bogging it down with more code, but I should
have known there would be more differences between the versions than I
originally thought.

Thank you for your time and solution €“ Jenny B.


"Barb Reinhardt" wrote:

If you're running in both Excel 2007 and 2003 and need to have different code
for each, do something like this

If Val(Application.Version) = 12 then
'Excel 2007 code
else
'Excel 2003 code
end if
--
HTH,

Barb Reinhardt



"Jenny B." wrote:

Good Afternoon,

I'm trying to switch a spreadsheet with Programming/Macros from Office 2003
to 2007 . I'm having some compatibility issues and I'm hoping someone can
help.

In Excel 2003, if you had Text Fields or Shapes and were sending to a new
workbook, these were automatically ported over (meaning you'd have to program
in a logic if you didn't want them to show up the new worksheet). I'm hoping
to continue that working in Office 2007 but that doesn't appear to be the
case. Since I have so many Text Fields and shapes I'm carrying over to the
unformatted worksheet, I'm hoping there is a solution (vs. referencing all
fields) to have it carry these over automatically.

I'm writing from an existing workbook to a new sheet and below is the code.
I have to keep the doc in XLS form even though I'm working in 2007 Excel
(some users are still on 2003). When use the routine below from Excel 2007,
it will not bring the fields over and half of the page appears blank since
Excel 2003 automatically brings them over.

Any thoughts on a quick fix?

Thank you in advance - Jenny B.


Sub Finalstop()

Dim myPath As String
Dim nRng As Range
Dim fName As String
Set nRng = Range("F64")

ActiveSheet.Copy

myPath = "I:\Document Management\Print management\Operations\B55
Docs\B55 Testing Checklist\"
fName = nRng.Value & ".xls"

ActiveWorkbook.SaveAs Filename:= _
myPath & fName, FileFormat:= _
xlNormal, Password:="", _
WriteResPassword:="", _
ReadOnlyRecommended:=False, _
CreateBackup:=False
ActiveWorkbook.Close
ActiveSheet.Visible = False

End Sub

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
Excel 2007 versus Excel 2003 & Excel 97-2003 fully compatible Bumpersnesty Excel Worksheet Functions 0 April 26th 10 09:44 PM
Excel opens two windows (2007 & 2003 format): I want only 2003. Rob Excel Discussion (Misc queries) 0 March 6th 10 07:46 PM
Excel 2003 help doesn't work. I got both Excel 2003 and 2007 insta Kenneth Andersen Excel Discussion (Misc queries) 0 February 16th 10 10:44 AM
Excel 2007, I write macros in 2003 is 2007 similar for VBA? Pros andcons please Simon[_2_] Excel Programming 3 August 5th 08 03:48 PM
How to instantiate Excel 2003 when both 2003 and 2007 are installe Raghu Excel Programming 2 December 19th 07 04:21 PM


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

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

About Us

"It's about Microsoft Excel"