ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel Automation/Immediate Window (https://www.excelbanter.com/excel-programming/362766-excel-automation-immediate-window.html)

AA2e72E

Excel Automation/Immediate Window
 
Is it possible to type and execute code in the Immediate Window of an
instance of Excel automation?

Dave Peterson

Excel Automation/Immediate Window
 
Yep. You may find it very useful when debugging. I'm not sure I would expect
the users of a workbook to do this, though.

AA2e72E wrote:

Is it possible to type and execute code in the Immediate Window of an
instance of Excel automation?


--

Dave Peterson

AA2e72E

Excel Automation/Immediate Window
 
On clicking POST, I realised that my question would be misunderstood!

What I meant to ask was this:

Is is possible for to type/write code programatically (from the client using
Excel as an automation server) into the Immediate Window and execute it?




Tom Ogilvy

Excel Automation/Immediate Window
 
I think it would be a real kludge. I remember someone posting code to clear
the immediate window from that instance of excel and it was basically a
Sendkeys operation. (and when there was a glitch, it wiped all the code out
a module).

Depending on what you want to do, Windows Scripting Host has an evaluate
command I believe.

--
Regards,
Tom Ogilvy


"AA2e72E" wrote:

On clicking POST, I realised that my question would be misunderstood!

What I meant to ask was this:

Is is possible for to type/write code programatically (from the client using
Excel as an automation server) into the Immediate Window and execute it?




AA2e72E

Excel Automation/Immediate Window
 
I wanted to be able to execute code in the immediate window when I do not
need the result or when there is no result. I guess it is easier to add
subroutines from the Client and then run them on the Server.

An example of what I had in mind: From the Client, I wanted to be able to

Name ThisFile As ThatFile

where Name does not return a result.


"Tom Ogilvy" wrote:

I think it would be a real kludge. I remember someone posting code to clear
the immediate window from that instance of excel and it was basically a
Sendkeys operation. (and when there was a glitch, it wiped all the code out
a module).

Depending on what you want to do, Windows Scripting Host has an evaluate
command I believe.

--
Regards,
Tom Ogilvy


"AA2e72E" wrote:

On clicking POST, I realised that my question would be misunderstood!

What I meant to ask was this:

Is is possible for to type/write code programatically (from the client using
Excel as an automation server) into the Immediate Window and execute it?





All times are GMT +1. The time now is 08:48 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com