How to add a ready macro to excel
Closed
lenin
-
Jul 11, 2009 at 01:19 PM
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Jul 11, 2009 at 09:04 PM
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Jul 11, 2009 at 09:04 PM
Related:
- How to add a ready macro to excel
- How to add songs to sound picker - Guide
- How to add @ in laptop - Guide
- 2007 microsoft office add-in microsoft save as pdf or xps - Download - Other
- Add gif to excel - Guide
- How to add hard drive to pc windows 11 - Guide
1 response
venkat1926
Posts
1863
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
811
Jul 11, 2009 at 09:04 PM
Jul 11, 2009 at 09:04 PM
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.?