LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Excel 2007 macro conflicts with excel 2003

The macro below works great in excel 2003. however in excel 2007 I get
a mesage as follows:-

The following features cannot be saved in macro free workbook

VBProject

To save a file with these features click no, then choose a macro
enabled file type in the File Type list.

To continue saving as a macro free workbook chose yes.


The code below I put together several years ago with the help of a Ron
DeBriun posting.

The workbook itself is an excel 97-2003 format (in excel 2007 it comes
up as (combatability mode), I'm the only user currently using excel
2007, other users will remain on excel 2003 until this problem is
resolved. The problem occur when I save the file to email, I noted the
location below where the macro fails

..SaveAs " " & sh.Name & " " & custname & " " & strdate & ".xls" this
line fails.

Any help would be greatly appreciated

burl_rfc

Sub Rectangle15_Click()
'Mail_Every_Worksheet2()
Dim sh As Worksheet
Dim wb As Workbook
Dim strdate As String
Dim custname As String
Dim MyArrIndex As Long
Dim E_Mail_Count As Long
Dim cell As Range
Dim MyArr() As String
Application.ScreenUpdating = False
Worksheets("QuoteForm").Activate
Range("I10").Select
Selection.Copy
Range("L2").Select
custname = Range("b7")
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
For Each sh In ThisWorkbook.Worksheets
If sh.Range("L1").Value Like "?*@?*.?*" Then
strdate = Format(Now, "mm-dd-yy h-mm-ss")

E_Mail_Count = sh.Columns("L").Cells.SpecialCells
(xlCellTypeConstants).Count
ReDim MyArr(1 To E_Mail_Count)
MyArrIndex = 1
For Each cell In sh.Columns("L").Cells.SpecialCells
(xlCellTypeConstants)
If cell Like "*@*" Then
MyArr(MyArrIndex) = cell.Value
MyArrIndex = MyArrIndex + 1
End If
Next
ReDim Preserve MyArr(1 To MyArrIndex)

sh.Copy
Set wb = ActiveWorkbook
sh.Name = Range("b6")
With wb

problem ocurrs on the following line

.SaveAs " " & sh.Name & " " & custname & " " &
strdate & ".xls"

.SendMail MyArr, _
"New DT Flycut Quote (Customer: " & custname
& ") "
.ChangeFileAccess xlReadOnly
Kill .FullName
.Close False
End With

End If

Next sh

Application.ScreenUpdating = True
ActiveSheet.Name = "QuoteForm"
Worksheets("Quote Data Entry").Activate

Call Rectangle16_Click

End Sub
 
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 2003 Macro taking long time in Excel 2007 Satish Excel Discussion (Misc queries) 3 November 3rd 09 04:58 PM
Excel 2007 Goal Seek Macro Running 7 times slower than Excel 2003 Thomas Shortt Excel Programming 0 September 15th 08 04:32 PM
Excel 2007 Macro Help (Excel 2003 not working in 2007) Pman Excel Discussion (Misc queries) 4 May 29th 08 06:29 PM
Any known Excel 2002 & 2003 Conflicts? geoffkb Excel Discussion (Misc queries) 0 August 8th 06 12:47 AM
Loading Office 2003 Service Pack 2 conflicts with Excel Subtotal Steve J. Excel Worksheet Functions 0 November 1st 05 12:18 AM


All times are GMT +1. The time now is 06:41 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"