Hello!
I need to create a macro that updates some datas for me, but I am having some troubles switching workbooks.
I need to activate a workbook that has the date of the yesterday on it's name.
i.e: a have an workbook that is updated everyday, so it's name is Open PO_yyyymmdd.
This macro will open this workbook (which is the one that I need to update data) and two others.
After it opens these workbooks, I need it to activate the one named Open PO_yyyymmdd.
Does anyone knows if it's possible to do so?
Here is the part of the code that I need help (specifically the last line of code):
Workbooks.Open Filename:="C:\Users\Felipe\Desktop\Open PO_XXX" & Format(Date, "yyyymmdd")
Workbooks.Open Filename:="C:\Users\Felipe\Desktop\POs_With_Cost"
Workbooks.Open Filename:="C:\Users\Felipe\Desktop\Macro"
Workbooks("Open PO_XXX ").Activate
Can anyone help me, please?
Thanks in advance.
I need to create a macro that updates some datas for me, but I am having some troubles switching workbooks.
I need to activate a workbook that has the date of the yesterday on it's name.
i.e: a have an workbook that is updated everyday, so it's name is Open PO_yyyymmdd.
This macro will open this workbook (which is the one that I need to update data) and two others.
After it opens these workbooks, I need it to activate the one named Open PO_yyyymmdd.
Does anyone knows if it's possible to do so?
Here is the part of the code that I need help (specifically the last line of code):
Workbooks.Open Filename:="C:\Users\Felipe\Desktop\Open PO_XXX" & Format(Date, "yyyymmdd")
Workbooks.Open Filename:="C:\Users\Felipe\Desktop\POs_With_Cost"
Workbooks.Open Filename:="C:\Users\Felipe\Desktop\Macro"
Workbooks("Open PO_XXX ").Activate
Can anyone help me, please?
Thanks in advance.