mercredi 26 novembre 2014

Excel VBA: ActiveWorkbook not changing when I open a new Workbook


Vote count:

0




Here is the small bit of code that should play a role:



Workbooks.Open (MPPGLoc)

ActiveWorkbook.Sheets("MPPG").Activate

ActiveSheet.Move Before:=Workbooks("DPV Acq Test.xlsm").Sheets(1)


I am having the user input the file location for a payment plan, then supposedly going to the correct sheet in the plan and trying to copy it into a different workbook which automates everything. However this keeps simply moving one of the worksheets in the original workbook in front of the other worksheets.


Not sure if the problem is because opening a workbook doesn't necessarily make it active, or a problem with my move function. Any help is appreciated, thanks.



asked 30 secs ago







Excel VBA: ActiveWorkbook not changing when I open a new Workbook

Aucun commentaire:

Enregistrer un commentaire