Hi,
I am calling macor named Main12 in another sub procedure called as Button_click. and I have assigned button_click macro to on ecommand button. When I click this button only code in button_click macro gets exceuted but not main 12 macro.
what all changes I need to do to make it work now.
Here is the code :
Sub Button_Click()
Application.EnableEvents = False
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Application.wait (Now() + TimeValue("00:00:00"))
Call Main12
End If
End Sub
Sub Main12()
Dim target As Worksheet
Application.ScreenUpdating = False
Application.EnableEvents = False
Worksheets("INPUTOUTPUT").Range("N10") = 0
Application.ScreenUpdating = False
Application.EnableEvents = False
Set target = Worksheets("5S-C")
With Worksheets("INPUTOUTPUT")
If .Range("C7").Value = "5Stage" And .Range("C9").Value = "YES" Then
'.Select
Range("V72:V75").Copy
'Sheets("5S-C").Select
'target.Range("F33:F36").PasteSpecial Paste:=xlPasteValues
'.Select
'Range("V73").Copy
'Sheets("5S-C").Select
'Range("G33").PasteSpecial Paste:=xlPasteValues
'.Select
'Range("V74").Copy
'Sheets("5S-C").Select
'Range("H33").PasteSpecial Paste:=xlPasteValues
'.Select
'Range("V75").Copy
'Sheets("5S-C").Select
'Range("I33").PasteSpecial Paste:=xlPasteValues
target.Range("O30").Value = .Range("W87").Value
target.Range("P30").Value = .Range("W88").Value
target.Range("Q30").Value = .Range("W89").Value
target.Range("R30").Value = .Range("W90").Value
target.Range("S30").Value = .Range("W91").Value
End If
End With
Application.ScreenUpdating = True
Application.EnableEvents = True
End Sub
Bookmarks