How to add a ready macro to excel
Closed
lenin
-
11 Jul 2009 à 13:19
venkat1926 Posts 1863 Registration date Sunday 14 June 2009 Status Contributor Last seen 7 August 2021 - 11 Jul 2009 à 21:04
venkat1926 Posts 1863 Registration date Sunday 14 June 2009 Status Contributor Last seen 7 August 2021 - 11 Jul 2009 à 21:04
Related:
- How to add a ready macro to excel
- How to add a checkmark in word - Guide
- How to add at the rate in laptop - Guide
- How to add days to a date in excel - Guide
- How to add authorized user t mobile - Guide
- How to add keywords to youtube channel - Guide
1 response
venkat1926
Posts
1863
Registration date
Sunday 14 June 2009
Status
Contributor
Last seen
7 August 2021
811
11 Jul 2009 à 21:04
11 Jul 2009 à 21:04
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.?
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.?