Hey guys,
I need help with adjusting my macro. Basically it opens a file and then copies content. However before doing the copying, I want it to check if on the file it opened whether the content of G1 is "pass". If it is pass to run the macro "Adjust" on that workbook.
How do I do that? I tried with:
If ActiveWorkbook.Worksheets("Target").Cell("G1") = "pass" Then Application.Run ActiveWorkbook.Name & "!Adjust"
but it gives me an error
Thank you in advance!Please Login or Register to view this content.
P.S.:
Okay, found it. It works fine this way:
If ActiveWorkbook.Worksheets("Target").Range("G1").Value = "pass" Then Application.Run ActiveWorkbook.Name & "!Adjust"
Bookmarks