Hi, all
Hope you're safe and sound.
I have these 2 workbooks that I need to deal with a little bit of VBA.
I have started the code with:
Sub openRawOutputFile()
Dim myFileName As Variant
myFileName = Application.GetOpenFilename(FileFilter:="Excel Files,*.xlsx*;*.xlsm*")
If myFileName <> False Then
Workbooks.Open (myFileName)
End If
'ActiveWorkbook.Worksheets("result_arc").Activate
' Select cell A2, *first line of data*.
ThisWorkbook.Sheets("Variables").Range("A2").Select
' Set Do loop to stop when an empty cell is reached.
Do Until IsEmpty(ActiveCell)
' Step down 1 row from present location.
ActiveCell.Offset(1, 0).Select
Loop
End Sub
But I'm stuck with creating a loop code.
The intended workflow is as below:
1. Start
2. Run the code from "Scheduler" file (as attached).
3. Let user select the Raw Output file (the filename could be anything).
4. Program opens result_arc sheet.
5. If "Parameter" in result_arc sheet of the Raw Output file is the same as any "Parameter" listed in "Variables" sheet in "Scheduler" file, the "Shop" and "Nomenclature" from "Variables" sheet will be copied following the "Parameter", together with the "Value" and "Date", and to be pasted to "Consignes" sheet in "Scheduler" workbook. This will loop until there's no more "Parameter" listed in "Variables" sheet.
5. End task
Any help would be really appreciated. Thank you in advance and stay safe!
Bookmarks