Hi all,
I'm have a form which captures some criteria and uses the criteria to return some data using a database query (using jet). When clicking a command button the form items are passed to a worksheet and I then invoke the 'run' option in the excel jet menu.
All is absolutely fine if I have no other workbooks open. But if I already have another workbook open, the 'run' command seems to invoke the run option in the already open workbook. I've tried using
.. But I cannot get it to work.
Any ideas how to specify that the menu command is activated on the active workbook?
Thanks in advance
I'm have a form which captures some criteria and uses the criteria to return some data using a database query (using jet). When clicking a command button the form items are passed to a worksheet and I then invoke the 'run' option in the excel jet menu.
All is absolutely fine if I have no other workbooks open. But if I already have another workbook open, the 'run' command seems to invoke the run option in the already open workbook. I've tried using
VBA Code:
Thisworkbook.activate
Any ideas how to specify that the menu command is activated on the active workbook?
Thanks in advance