Search : in
By :

How to add a ready macro to excel

Last answer on Jul 12, 2009 2:04:41 am BST lenin, on Jul 11, 2009 6:19:51 pm BST 
 Report this message to moderators

Hello,
I have downloaded a macro from a blog to keep a track of time and date when a cell was modified last. Please help me how to add it to the excel. I have tried pasting it in view code and getting the time and date until i close it once, but when I reopen it I don't find the macro again.

Configuration: Windows XP
Firefox 3.0.11

Best answers for « How to add a ready macro to excel » in :
Excel - Using IF statement to add 1 to total ShowExcel - Using IF statement to add 1 to total Issue Solution Note Issue I am trying to get a formula to add + 1 to a total cell based on the word typed. Example : If I type the word Duty in cells B3:B18 then add + 1 to cell B35. If...
Connect a database (MDB) to excel Show[VBA] Connecting a database (MDB) to excel Below is a tips of how to connect an Access database (MDB) in an application excel Add reference Microsoft DAO object librairy X.X In a general module (eg Module1) paste the code below...
Inserting an animated gif in Excel ShowInserting an animated gif in Excel To insert an animated gif image in an Excel spreadsheet, you must insert the image into a control. To insert the control, go to the View menu/Toolbars/Control Toolbox Activate the first button Design...
Download Microcharts ShowWhen making an important decision, it is important to see and analyze in details the different data. By simply adding Microcharts, Microsoft Excel can provide you a complete analysis of your current situation. Microcharts is an add-in for...
Worksheet - Cells ShowThe Concept of a Cell A "cell" is the intersection between a line (horizontal) and a column (vertical) on a worksheet. Thus, the name of the line combined with the name of the column gives the cell's coordinates (the term address is sometimes also...

1

 venkat1926, on Jul 12, 2009 2:04:41 am BST

Its depends upon whether it is a standard macro or an event handler. Standard macro start with
sub <name of the sub>()

e.g. sub test()

click alt+F11 and click control+R you will see the names of the open workbookks. highlight the relevant workbook and click insert(menu) +module then the vbedtior opens and there you copy paste the macro

If it is event handler then it starts with

Private Sub Worksheet_SelectionChange(ByVal Target As Range) or
Private Sub Worksheet_Calculate()
(note worksheet after sub)

this means it is a sheet event handler (for a particular sheet ).in such case right click particular sheet tab and click view code and copy paste the macro there .

If it is workbook event handler it will start with
Private Sub Workbook_SheetCalculate(ByVal Sh As Object)
(see the workbook after sub)

In such a case right lclick the excel icon on the left of file menu and click view code and there copy paste the macro.

if there is any other doubt post your doubt. what is the version of your excel.?

Reply to venkat1926