S
stan
New to VVA and trying to run a procedure that opens a particular workbook
then runs a procedure that pastes a
worksheet into the target worksheet from the source worksheet ("dollars").
There will be six tartet workbooks when I'm done but I can't get past the
first two.
It will open each workbook correctly if I exclude "dollars" procedures. If
I include them it only runs the first one
sucessfully.
What am I doing wrong?
Sub update_finance()
'
Application.DisplayAlerts = False
If Range("b4").Value = "expenses1" Then Workbooks.Open "C:\expenses1.xlsm"
Application.Run "'dollars1.xlsm'!SAVE_expenses1"
If Range("b4").Value = "expenses2" Then Workbooks.Open "C:\expenses2.xlsm"
Application.Run "'dollars2.xlsm'!SAVE_expenses2"
Application.DisplayAlerts=True
End Sub
then runs a procedure that pastes a
worksheet into the target worksheet from the source worksheet ("dollars").
There will be six tartet workbooks when I'm done but I can't get past the
first two.
It will open each workbook correctly if I exclude "dollars" procedures. If
I include them it only runs the first one
sucessfully.
What am I doing wrong?
Sub update_finance()
'
Application.DisplayAlerts = False
If Range("b4").Value = "expenses1" Then Workbooks.Open "C:\expenses1.xlsm"
Application.Run "'dollars1.xlsm'!SAVE_expenses1"
If Range("b4").Value = "expenses2" Then Workbooks.Open "C:\expenses2.xlsm"
Application.Run "'dollars2.xlsm'!SAVE_expenses2"
Application.DisplayAlerts=True
End Sub