#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro Issue

Hey guys,

I am having an issue with a macro from Excel 2002 in Excel 2003. Under
2002 it works just fine, but errors out in 2003.

Can anyone tell what is wrong with it, any help would be greatly
appreciated -

Sub Save_to_History()

Dim BackupFileName As String

BackupFileName = Range("openfile")

If MsgBox("Are you sure you want to save to history?", vbYesNo +
vbCritical, "WARNING!") = vbYes Then

ActiveWorkbook.Save
ActiveWorkbook.SaveCopyAs ("C:\data\forms\history\" & Range("o3"))

End If


End Sub

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default Macro Issue

What is the error and at what line does it occur?
Possibilities...

Splitting a line in a msgbox at the "+" sign can result in Excel
dropping the "+".

Since you have a new version of Excel, does that mean you are
using a different computer? If so the file path may not exist.

Is there already an existing file with the name you are trying to use?

Is there a named range called "openfile". How is it used in the sub?
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware


"TimWal"
wrote in message
Hey guys,
I am having an issue with a macro from Excel 2002 in Excel 2003. Under
2002 it works just fine, but errors out in 2003.
Can anyone tell what is wrong with it, any help would be greatly
appreciated -

Sub Save_to_History()

Dim BackupFileName As String

BackupFileName = Range("openfile")

If MsgBox("Are you sure you want to save to history?", vbYesNo +
vbCritical, "WARNING!") = vbYes Then
ActiveWorkbook.Save
ActiveWorkbook.SaveCopyAs ("C:\data\forms\history\" & Range("o3"))
End If
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
Macro issue 2 Farhad Excel Discussion (Misc queries) 6 December 21st 08 07:14 PM
Macro issue Steved Excel Programming 4 May 24th 06 10:08 AM
Excel Macro Issue Trying to autorun Macro Upon Opening Worksheet wyndman Excel Programming 2 May 25th 04 06:59 PM
Macro Issue alexm999[_9_] Excel Programming 2 January 29th 04 10:46 PM
Macro issue alexm999[_3_] Excel Programming 4 January 23rd 04 07:35 PM


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