D
D
I have in use the formula listed here:
Sub Saveasnewfile()
Dim rangevalue As String
rangevalue = Range("c4").Value
ThisWorkbook.saveas Format(Now(), "mm-dd-yy ") & rangevalue & ".xls"
End Sub
I start with a read-only file.
I enter data then run the macro (from a custom macro button on the
toolbar).
It does as expected until the need arises to delete the last created
file.
Then I get this error upon creating a new file and running the macro
after the deletion of the last created file: "If you are trying to
open the file from your list of most recenty used files on the File
menu, make sure that the file has not been renamed, removed, or
deleted".
Can someone please advise me in what needs to be done to get the macro
to NOT refer back to the last created file and to create a new file no
matter what I do to any of the created files?
TIA
Sub Saveasnewfile()
Dim rangevalue As String
rangevalue = Range("c4").Value
ThisWorkbook.saveas Format(Now(), "mm-dd-yy ") & rangevalue & ".xls"
End Sub
I start with a read-only file.
I enter data then run the macro (from a custom macro button on the
toolbar).
It does as expected until the need arises to delete the last created
file.
Then I get this error upon creating a new file and running the macro
after the deletion of the last created file: "If you are trying to
open the file from your list of most recenty used files on the File
menu, make sure that the file has not been renamed, removed, or
deleted".
Can someone please advise me in what needs to be done to get the macro
to NOT refer back to the last created file and to create a new file no
matter what I do to any of the created files?
TIA