Patricia0923
New Member
- Joined
- Mar 18, 2014
- Messages
- 25
Hi,
I am writing a lot of code and have separated each section in different modules
For example, I have one module titled OpenR2D2 and another titled StoreName
I want the sub in StoreName to run at the end of OpenR2D2 but I get this compile error
"expected variable or procedure, not module"
Here's the end of the code where I put it. What have I not thought of? Thanks so much!
ThisWorkbook.Activate
Range("B9:G9").PasteSpecial
R2D2data.Activate
Range("B7:G7").Copy 'Sch Actual VLH
ThisWorkbook.Activate
Range("B12:G12").PasteSpecial
Call StoreName
R2D2data.Close Savechanges:=False
Application.ScreenUpdating = True
End Sub
I am writing a lot of code and have separated each section in different modules
For example, I have one module titled OpenR2D2 and another titled StoreName
I want the sub in StoreName to run at the end of OpenR2D2 but I get this compile error
"expected variable or procedure, not module"
Here's the end of the code where I put it. What have I not thought of? Thanks so much!
ThisWorkbook.Activate
Range("B9:G9").PasteSpecial
R2D2data.Activate
Range("B7:G7").Copy 'Sch Actual VLH
ThisWorkbook.Activate
Range("B12:G12").PasteSpecial
Call StoreName
R2D2data.Close Savechanges:=False
Application.ScreenUpdating = True
End Sub