Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]() I need a button that when pressed inserts today's date in a specific cell - only if its less than today's date or blank. If its already today's date, then do nothing. I have the following code that I've used to insert the date upon opening a workbook, but I can't seem to get it to work attached to a button.. Private Sub Workbook_Open() Dim cell As Range Set cell = Worksheets("Sheet1").Range("A1") If cell.Text = "" Then cell.Value = Date End If End Sub Thanks. -- edwardpestian ------------------------------------------------------------------------ edwardpestian's Profile: http://www.excelforum.com/member.php...o&userid=33809 View this thread: http://www.excelforum.com/showthread...hreadid=556384 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel: Toolbar button for Formatting cells to date STYLES etc | Setting up and Configuration of Excel | |||
Recurring annual events using a specific date as a trigger date | Excel Worksheet Functions | |||
date format problem | Excel Discussion (Misc queries) | |||
Adding a control button to insert a date in the active cell. | Excel Discussion (Misc queries) | |||
Macro to simply bring up the Find dialogue box?? | Excel Discussion (Misc queries) |