nagovind
Member
There is an issue with Worksheet_Calculate function
please refer below codes part 1 & 2
Part 2 is working separately if the function header is as Worksheet_Calculate(ByVal Target As Range)
Part 1 is working separately if the function header is as Worksheet_Calculate()
BUT IT IS NOT POSSIBLE TO COMBINE PART 1 AND PART 2
How to combine the above 2 part as i need the operation in the same work sheet
PLEASE ADVISE
Private Sub Worksheet_Calculate()
'This is required for STAR DELTA Transformation
'SCC_Tx-Utility Module
'-------------------------------------------------------------------
'Part 1
'-------------------------------------------------------------------
If Worksheets("SCC").Range("D48").Value = 0 Then
Worksheets("SCC").Shapes("Picture 410").Visible = True
Else
Worksheets("SCC").Shapes("Picture 410").Visible = False
End If
'-------------------------------------------------------------------
'Part 2
'-------------------------------------------------------------------
If Target.Address = Worksheets("SCC_Tx-Utility").Range("AD29") Then
Worksheets("SCC").Range("AD29").Select
Selection.Copy
Worksheets("SCC").Range("AD41").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Worksheets("SCC").Range("AD31").Select
End If
End Sub
please refer below codes part 1 & 2
Part 2 is working separately if the function header is as Worksheet_Calculate(ByVal Target As Range)
Part 1 is working separately if the function header is as Worksheet_Calculate()
BUT IT IS NOT POSSIBLE TO COMBINE PART 1 AND PART 2
How to combine the above 2 part as i need the operation in the same work sheet
PLEASE ADVISE
Private Sub Worksheet_Calculate()
'This is required for STAR DELTA Transformation
'SCC_Tx-Utility Module
'-------------------------------------------------------------------
'Part 1
'-------------------------------------------------------------------
If Worksheets("SCC").Range("D48").Value = 0 Then
Worksheets("SCC").Shapes("Picture 410").Visible = True
Else
Worksheets("SCC").Shapes("Picture 410").Visible = False
End If
'-------------------------------------------------------------------
'Part 2
'-------------------------------------------------------------------
If Target.Address = Worksheets("SCC_Tx-Utility").Range("AD29") Then
Worksheets("SCC").Range("AD29").Select
Selection.Copy
Worksheets("SCC").Range("AD41").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Worksheets("SCC").Range("AD31").Select
End If
End Sub