Hi all
Now I have 2 File
-VBA_CONTROL_FCO_NEW
-FCO_NEW
[VBA_CONTROL_FCO_NEW]
Run Macro
open loop
Open [FCO_NEW] file
[FCO_NEW] run macro and save as (Change File name) and Close
end loop
File FCO_NEW <<< Run Macro BClear>>> change file name >> Save as >> Close
My Problem is when file [FCO_NEW] run [B_Clear] end it must be loop in [VBA_CONTROL_FCO_NEW] File
Thank you all
Sorry about my english
Now I have 2 File
-VBA_CONTROL_FCO_NEW
-FCO_NEW
[VBA_CONTROL_FCO_NEW]
Run Macro
open loop
Open [FCO_NEW] file
[FCO_NEW] run macro and save as (Change File name) and Close
end loop
Code:
Sub Macro2()Dim i As Integer
For i = 1 To 6
Workbooks.Open ("C:\Users\THJunsomPa\Desktop\VBAEXCEL\FCO_NEW.xlsm")
Windows("VBA_CONTROL_FCO_New.xlsm").Activate
Range("J2") = Range("A" & i + 1).Value
MsgBox Range("J2")
Range("J3") = Range("B" & i + 1).Value
MsgBox Range("J3")
Call Macro1
Call Marcodd
MsgBox i
Next i
End Sub
Sub Marcodd()
Application.Run "'" & "C:\Users\THJunsomPa\Desktop\VBAEXCEL\FCO_NEW.xlsm" & "'!B_Clear"
End Sub
File FCO_NEW <<< Run Macro BClear>>> change file name >> Save as >> Close
My Problem is when file [FCO_NEW] run [B_Clear] end it must be loop in [VBA_CONTROL_FCO_NEW] File
Thank you all
Sorry about my english
Last edited: