Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Have code, need to travel

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Have code, need to travel

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Time it took to travel Steved Excel Worksheet Functions 2 November 13th 07 10:01 PM
Travel through no of sheets in a workbook. Raj[_11_] Excel Programming 4 September 27th 07 01:46 PM
Travel time problem Paul Excel Worksheet Functions 2 December 2nd 06 12:58 PM
travel expenses by month silky_green Excel Discussion (Misc queries) 1 August 23rd 06 04:09 PM
must I travel through UserForm_activate event? Dave B[_9_] Excel Programming 1 December 21st 05 01:43 AM


All times are GMT +1. The time now is 06:04 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"