Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro issue 2 | Excel Discussion (Misc queries) | |||
Macro issue | Excel Programming | |||
Excel Macro Issue Trying to autorun Macro Upon Opening Worksheet | Excel Programming | |||
Macro Issue | Excel Programming | |||
Macro issue | Excel Programming |