View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
GS[_2_] GS[_2_] is offline
external usenet poster
 
Posts: 3,514
Default If cell is blank automatically enter today's date in the same cell

GS has a motor skills disability that causes him to miss keystrokes
when he's tired. Geez, I hate when that happens!

The code will run whenever the sheet is activated. If the workbook is saved
with that sheet the active sheet then the code will run when the file opens.


Note, though, that it will also run if you switch back to that sheet
after

working on another sheet, OR working in another workbook and switching back
to that sheet.

Once you put macros into a workbook, you'll need to change Excel's Macro
Security to use the macros whenever the workbook is reopened. Everyone that
uses this file will have to do the same.

In Excel2007...

Home button Excel Options Trust Center Trust Center Settings...

In the Trust Center dialog...

Macro Settings
..choose option2 under 'Macro Settings' section

..which will disable macros with notification that prompts you to enable them
via a warning bar at the top of the worksheet. Note that leaving macros
disabled will require making the changes manually, same as without the macro.

HTH


--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc