Hello every one.
I have a VBA Form.
And every time i click on the button they execute the followed code:
But every week this code should change.PHP Code:
Private Sub CommandButton10_Click()
'Me.Hide
'UserForm1.Show
Workbooks.Open Filename:="\\pttudor\GROUP\GERAL\Montagem\FY19\Planos de Produção\01 April\week 17\RESUMO FABRICAÇÃO WK17.xlsm"
Me.Hide
Windows("PORTAL MONTAGEM.xlsm").Activate
Windows("PORTAL MONTAGEM.xlsm").Close
End Sub
Next week should open
"\\pttudor\GROUP\GERAL\Montagem\FY19\Planos de Produção\02 May\week 18\RESUMO FABRICAÇÃO WK18.xlsm"
next
"\\pttudor\GROUP\GERAL\Montagem\FY19\Planos de Produção\02 May\week 19\RESUMO FABRICAÇÃO WK19.xlsm"
next
"\\pttudor\GROUP\GERAL\Montagem\FY19\Planos de Produção\02 May\week 20\RESUMO FABRICAÇÃO WK20.xlsm"
next
"\\pttudor\GROUP\GERAL\Montagem\FY19\Planos de Produção\02 May\week 21\RESUMO FABRICAÇÃO WK21.xlsm"
next
"\\pttudor\GROUP\GERAL\Montagem\FY19\Planos de Produção\02 May\week 22\RESUMO FABRICAÇÃO WK22.xlsm"
then
"\\pttudor\GROUP\GERAL\Montagem\FY19\Planos de Produção\03 June\week 23\RESUMO FABRICAÇÃO WK23.xlsm"
any one have one idea how to do that Automatically ?
Bookmarks