Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi there,
How can I take this code, which does exactly what I'd like, and create a custom toolbar in excel? The entire package needs to be able to be transparently installed and used on end-users' machines without them seeing anything other than the custom menu or button. Is there a way to do all this? Any coding help would be appreciated as I am a new developer in general. It'd be spectacular to be able to select which cells are compared as well, but I understand I'm asking for a lot to begin with. Any help would be fantastic. The code I'm working with is as follows: Sub stance() Dim myrange, copyrange As Range Lastrow = Cells(Cells.Rows.Count, "B").End(xlUp).Row Set myrange = Range("B1:B" & Lastrow) For Each c In myrange If c.Value = c.Offset(, 1).Value Then If copyrange Is Nothing Then Set copyrange = c.EntireRow Else Set copyrange = Union(copyrange, c.EntireRow) End If End If Next If Not copyrange Is Nothing Then 'copyrange.EntireRow.Hidden = True copyrange.Delete End If End Sub --Any compiling, inserting and editing instructions would be helpful, this is a brand new world for me. Thanks. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
For additions to the worksheet menu bar, I really like the way John Walkenbach
does it in his menumaker workbook: http://j-walk.com/ss/excel/tips/tip53.htm Here's how I do it when I want a toolbar: http://www.contextures.com/xlToolbar02.html (from Debra Dalgleish's site) And if you use xl2007: If you want to learn about modifying the ribbon, you can start at Ron de Bruin's site: http://www.rondebruin.nl/ribbon.htm http://www.rondebruin.nl/qat.htm -- For macros for all workbooks (saved as an addin) or http://www.rondebruin.nl/2007addin.htm In xl2007, those toolbars and menu modifications will show up under the addins. jhonnyc377 wrote: Hi there, How can I take this code, which does exactly what I'd like, and create a custom toolbar in excel? The entire package needs to be able to be transparently installed and used on end-users' machines without them seeing anything other than the custom menu or button. Is there a way to do all this? Any coding help would be appreciated as I am a new developer in general. It'd be spectacular to be able to select which cells are compared as well, but I understand I'm asking for a lot to begin with. Any help would be fantastic. The code I'm working with is as follows: Sub stance() Dim myrange, copyrange As Range Lastrow = Cells(Cells.Rows.Count, "B").End(xlUp).Row Set myrange = Range("B1:B" & Lastrow) For Each c In myrange If c.Value = c.Offset(, 1).Value Then If copyrange Is Nothing Then Set copyrange = c.EntireRow Else Set copyrange = Union(copyrange, c.EntireRow) End If End If Next If Not copyrange Is Nothing Then 'copyrange.EntireRow.Hidden = True copyrange.Delete End If End Sub --Any compiling, inserting and editing instructions would be helpful, this is a brand new world for me. Thanks. -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Time it took to travel | Excel Worksheet Functions | |||
Travel through no of sheets in a workbook. | Excel Programming | |||
Travel time problem | Excel Worksheet Functions | |||
travel expenses by month | Excel Discussion (Misc queries) | |||
must I travel through UserForm_activate event? | Excel Programming |