Actualizar fecha

Liliana

New Member
Joined
Mar 2, 2012
Messages
1
Buen día, ecesito actualizar una fecha en una casilla, con un condicional. Primero hago el mensaje si desea actualizar la fecha, si no, sale y si desea actualizar, la debe actualizar en X casilla. Tengo eto, pero no sé en donde está la falla

Sub SalirAplic()
If MsgBox("¿Quiere actualizar la fecha?", vbQuestion + vbYesNo, "Ultima pregunta") = vbNo Then
Application.Quit
[Else Range("i4").select cell.formulaR1C1 = "=DATEVALUE" RANGE("I4").SELECT]
End If
End Sub
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Intente esto

Code:
Sub SalirAplic()
If MsgBox("¿Quiere actualizar la fecha?", vbQuestion + vbYesNo, "Ultima pregunta") = vbYes Then
    Range("I4").Value = DateValue(Range("I4").Value)
End If
End Sub
 
Upvote 0

Forum statistics

Threads
1,223,952
Messages
6,175,589
Members
452,653
Latest member
craigje92

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top