Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macros
one way:
Put it in a regular code module (Insert/Module in the VBE). Public Sub DateTimeButton_Click() Worksheets("SLP Schedule").Range("P2").Value = Now End Sub In article , "Erik" wrote: I have a sub in the thisworkbook code that places a date/time stamp in a cell when the workbook is opened. How can I make this a macro and assign it a button in the toolbar instead of it running on open? Private Sub Workbook_Open() Worksheets("SLP Schedule").Range("P2").Value = Now End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macros warning always shows up, even if all macros removed | Excel Discussion (Misc queries) | |||
Training: More on how to use macros in Excel: Recording Macros | Excel Worksheet Functions | |||
Macro Size Limit / open macros with macros? | Excel Programming | |||
Macros not appearing in the Tools Macro Macros list | Excel Programming | |||
Suppress the Disable Macros / Enable Macros Dialog | Excel Programming |