Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...tions/200805/1 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
mental block | Excel Worksheet Functions | |||
Average per block | Excel Worksheet Functions | |||
Block Protect | Excel Discussion (Misc queries) | |||
VBA error - End If without Block If | Excel Worksheet Functions | |||
Block entries | Excel Worksheet Functions |