G
Guest
This is in Excel 2003.
From one workbook I want to open another workbook, copy some data out and
then close the other workbook.
The code is like this -
set wkb = workbooks("C:\BlahBlah\AnotherWorkbook,xls").open
<do some things that all work fine>
wkb.close
<go off and do something different>
When run in the VBA code window this works wonderfully well. Exactly as one
would expect.
When this sub is assigned to a ctrl key and run from the worksheet pane all
works as expected with the exception that the external workbook is left open.
I'm obviously missing something but I haven't a clue what.
Can anyone oblige?
Cheers,
Dave
From one workbook I want to open another workbook, copy some data out and
then close the other workbook.
The code is like this -
set wkb = workbooks("C:\BlahBlah\AnotherWorkbook,xls").open
<do some things that all work fine>
wkb.close
<go off and do something different>
When run in the VBA code window this works wonderfully well. Exactly as one
would expect.
When this sub is assigned to a ctrl key and run from the worksheet pane all
works as expected with the exception that the external workbook is left open.
I'm obviously missing something but I haven't a clue what.
Can anyone oblige?
Cheers,
Dave