G
Guest
I have set up a add and a delete macro in my WB. I want the user to be able
to delete indivual lines or add a line beneth the add button. I set it up to
use hyperlink text by writing a macro on the sheet code. The Add button is in
column "L" or "12". The delete button is in column "M" or "13". The problem I
am having is it add or delete at the top and not the row inwhich the
hyperlink lies. Below are my current macros. Any help is greatly appreciated.
Thank you
Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
If Target.Range.Column = 13 Then Application.Run "'Unit Trend cost out
v1.xls'! del"
If Target.Range.Column = 13 Then Exit Sub
Rows(ActiveCell.Row).Select
Selection.Copy
Selection.Insert Shift:=xlDown
Rows(ActiveCell.Row).Select
Application.CutCopyMode = False
End Sub
Sub del()
ActiveCell.Select
Rows(ActiveCell.Row).Select
Selection.Copy
Rows(ActiveCell.Row).Select
Selection.Delete Shift:=xlDown
Rows(ActiveCell.Row).Select
End Sub
to delete indivual lines or add a line beneth the add button. I set it up to
use hyperlink text by writing a macro on the sheet code. The Add button is in
column "L" or "12". The delete button is in column "M" or "13". The problem I
am having is it add or delete at the top and not the row inwhich the
hyperlink lies. Below are my current macros. Any help is greatly appreciated.
Thank you
Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
If Target.Range.Column = 13 Then Application.Run "'Unit Trend cost out
v1.xls'! del"
If Target.Range.Column = 13 Then Exit Sub
Rows(ActiveCell.Row).Select
Selection.Copy
Selection.Insert Shift:=xlDown
Rows(ActiveCell.Row).Select
Application.CutCopyMode = False
End Sub
Sub del()
ActiveCell.Select
Rows(ActiveCell.Row).Select
Selection.Copy
Rows(ActiveCell.Row).Select
Selection.Delete Shift:=xlDown
Rows(ActiveCell.Row).Select
End Sub