P
Per Jessen
1) Using PasteSpecial you can choose to paste values only (no formatting)
2) Unprotect K Joint sheet by code and reprotect before exiting the macro.
See the code below:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
Dim sh As Worksheet
Dim sh1 As Worksheet
Dim PssWrd As String
Application.ScreenUpdating = False
Set sh = Worksheets("Section Properties")
Set sh1 = Worksheets("K Joint")
Set isect = Intersect(Target, Range("C12:C177"))
PssWrd = "JustMe" ' Change password to suit
If Not isect Is Nothing Then
sh1.Unprotect Password:=PssWrd
TargetRow = Target.Row
Cells(TargetRow, "A").Copy
sh1.Range("C16").PasteSpecial xlPasteValues
Cells(TargetRow, "C").Copy
sh1.Range("E16").PasteSpecial xlPasteValues
Cells(TargetRow, "G").Copy
sh1.Range("G16").PasteSpecial xlPasteValues
sh1.Protect Password:=PssWrd
End If
Application.ScreenUpdating = True
End Sub
3) How do I determine if user want to change Cord or Brace ( and which row).
How to determine if user want to change either of the Joints?
It might be eaysier for me to create a solution for question 3, if you mail
me a sample workbook with a description of your desires.
2) Unprotect K Joint sheet by code and reprotect before exiting the macro.
See the code below:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
Dim sh As Worksheet
Dim sh1 As Worksheet
Dim PssWrd As String
Application.ScreenUpdating = False
Set sh = Worksheets("Section Properties")
Set sh1 = Worksheets("K Joint")
Set isect = Intersect(Target, Range("C12:C177"))
PssWrd = "JustMe" ' Change password to suit
If Not isect Is Nothing Then
sh1.Unprotect Password:=PssWrd
TargetRow = Target.Row
Cells(TargetRow, "A").Copy
sh1.Range("C16").PasteSpecial xlPasteValues
Cells(TargetRow, "C").Copy
sh1.Range("E16").PasteSpecial xlPasteValues
Cells(TargetRow, "G").Copy
sh1.Range("G16").PasteSpecial xlPasteValues
sh1.Protect Password:=PssWrd
End If
Application.ScreenUpdating = True
End Sub
3) How do I determine if user want to change Cord or Brace ( and which row).
How to determine if user want to change either of the Joints?
It might be eaysier for me to create a solution for question 3, if you mail
me a sample workbook with a description of your desires.