C
Carrie_Loos via OfficeKB.com
I think I am trying to do too much in one line but I am not sure how to write
it correctly. I want the user to be able to click on cell P1 and then a
message box ask if they have completed the input - If yes, then save the file
name and date, if no then end sub. I am getting the error message above and
can't figure it out. Can anyone help?
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
Dim ans As Long
If Target.Address = Range("p1").Address Then ans = MsgBox("Are you
finished inputing Daily Info?", vbYesNo)
If ans = vbNo Then ActiveWorkbook.SaveAs Filename:=Range("A1").Value &
Format(Worksheets("Daily").Range("ax1").Value, "yyyy-mm-dd") & ".xls"
End If
End Sub
Thanks
Carrie
it correctly. I want the user to be able to click on cell P1 and then a
message box ask if they have completed the input - If yes, then save the file
name and date, if no then end sub. I am getting the error message above and
can't figure it out. Can anyone help?
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
Dim ans As Long
If Target.Address = Range("p1").Address Then ans = MsgBox("Are you
finished inputing Daily Info?", vbYesNo)
If ans = vbNo Then ActiveWorkbook.SaveAs Filename:=Range("A1").Value &
Format(Worksheets("Daily").Range("ax1").Value, "yyyy-mm-dd") & ".xls"
End If
End Sub
Thanks
Carrie