J
jhonnyc377
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.
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.