ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Step thru (https://www.excelbanter.com/excel-programming/309411-step-thru.html)

Steved[_3_]

Step thru
 
Hello From Steved

In lotus 123 I used to be able to write code, highlite the
line of code, it would then run that part off code.

My question therefore is their a feature in excel you can
run a line of code.

The reason is that if their is such a feature it would
help.

Thankyou.

Myrna Larson

Step thru
 
Check out the options on the Debug and Run menus in the VB Editor.


On Wed, 8 Sep 2004 18:05:43 -0700, "Steved"
wrote:

Hello From Steved

In lotus 123 I used to be able to write code, highlite the
line of code, it would then run that part off code.

My question therefore is their a feature in excel you can
run a line of code.

The reason is that if their is such a feature it would
help.

Thankyou.



Bob Kilmer

Step thru
 
You cannot literally highlight an arbitrary section of code and run it. You
can copy a line to the Immediate Window and run it, if it makes sense. You
can leave it there and execute it again and again, if you like. You can
execute several independent statements at a time, if you separate them with
colons, but they have to be on "one line" (e.g., x=9: For i = 1 to 6:
Debug.Print i + x: Next i ).

If you have paused execution, variables will retain their values in the
Immediate window and you can investigate or change their values in the
Locals window. You can change variable values while paused by executing
statements in the Immediate window also.

Look at the Debug menu. You can step into code, out of procedures, over
calls and step line by line (F8), executing each line one at a time. You can
"run to the cursor." You can set a break point and execution will stop
there, where you can resume (F5) or step (F8). You can break on a particular
variable value or if it changes value, depending on what you set in the
Watch window.

In VBA, individual procedures will run independently of other procedures, if
they do not need arguments, even if they are ordinarily part of a larger
series of calls. You can have test procedure call other procedures that
require arguments.

Bob

"Steved" wrote in message
...
Hello From Steved

In lotus 123 I used to be able to write code, highlite the
line of code, it would then run that part off code.

My question therefore is their a feature in excel you can
run a line of code.

The reason is that if their is such a feature it would
help.

Thankyou.




Steved[_3_]

Step thru
 
Thankyou


-----Original Message-----
Hello From Steved

In lotus 123 I used to be able to write code, highlite

the
line of code, it would then run that part off code.

My question therefore is their a feature in excel you can
run a line of code.

The reason is that if their is such a feature it would
help.

Thankyou.
.


Steved[_3_]

Step thru
 
Hello Bob from Steved

I have read through your comments, and find them to be
very informative and I thankyou.

Cheers


-----Original Message-----
You cannot literally highlight an arbitrary section of

code and run it. You
can copy a line to the Immediate Window and run it, if it

makes sense. You
can leave it there and execute it again and again, if you

like. You can
execute several independent statements at a time, if you

separate them with
colons, but they have to be on "one line" (e.g., x=9: For

i = 1 to 6:
Debug.Print i + x: Next i ).

If you have paused execution, variables will retain

their values in the
Immediate window and you can investigate or change their

values in the
Locals window. You can change variable values while

paused by executing
statements in the Immediate window also.

Look at the Debug menu. You can step into code, out of

procedures, over
calls and step line by line (F8), executing each line one

at a time. You can
"run to the cursor." You can set a break point and

execution will stop
there, where you can resume (F5) or step (F8). You can

break on a particular
variable value or if it changes value, depending on what

you set in the
Watch window.

In VBA, individual procedures will run independently of

other procedures, if
they do not need arguments, even if they are ordinarily

part of a larger
series of calls. You can have test procedure call other

procedures that
require arguments.

Bob

"Steved" wrote in

message
...
Hello From Steved

In lotus 123 I used to be able to write code, highlite

the
line of code, it would then run that part off code.

My question therefore is their a feature in excel you

can
run a line of code.

The reason is that if their is such a feature it would
help.

Thankyou.



.



All times are GMT +1. The time now is 12:22 AM.

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