Folks: G'day. I am an absolute novice at VBA and macros. I do get around by adapting solutions provided by more knowledgeable and learned people. So please be understanding.
This is the issue I am trying to resolve. I need to highlight the current row I am using and I have the perfect code to use. The catch is that I would like to have it as a button (little smiley face) on the toolbar so that I can use it on any spreadsheet I am creating/using. I do not intend to distribute the code. I have found the perfect code - Thanks to David McRitchie. (http:// www.mvps.org/dmcritchie/excel/event.htm) This is the code I used: Private Sub Worksheet_SelectionChange(ByVal Target As Range) Cells.Interior.colorindex = 0 'Turn off previous use If Cells(1, 1) = "." Then Exit Sub Target.EntireRow.Interior.colorindex = 38 End Sub However as this code is limited to the sheet in which the code is placed, I then adapted it so that it is available on all worksheets in a workbook. Thanks to Damon Ostrander.(http://www.mrexcel.com/archive/ VBA/29582.html) I pasted a WorkbookSheetSelectionChange event in the ThisWorkbook event code pane and the code now works perfectly on all worksheets in a workbook. But I have to paste it to every workbook that I need to use the code in. With my limited knowledge, I then tried to turn it into an add-in ( .xla file) following instructions I found on the net 1.Insert Module 2. Pasted unchanged code into module 3. ALT-Q to return to sheet and saved as .xla files 4. Restarted Excel and ticked the add-in under Tools. 5. Tried to customise button - Toolbars - customise - command-macro- moved Smiley face to toolbar - Assign macro.........No macro available Please help!!! I am not competent enough to build a toolbar or write additional code to create a button. I would like to be able to use this code at my discretion on any spreadsheet without having to paste the code every time into the current spreadsheet. Thanks in advance and God bless, OR --~--~---------~--~----~------------~-------~--~----~ ------------------------------------------------------------------------------------- Some important links for excel users: 1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at http://www.excelitems.com 2. Excel tutorials at http://www.excel-macros.blogspot.com 3. Learn VBA Macros at http://www.vbamacros.blogspot.com 4. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com If you find any spam message in the group, please send an email to: Ayush Jain @ jainayus...@gmail.com or Ashish Jain @ 26may.1...@gmail.com ------------------------------------------------------------------------------------- -~----------~----~----~----~------~----~------~--~---