stop a macro to enter data to the cell I want

I

Ihuda Bunzl

Hi!
If I wrote an Excel macro which runs and calculates until it meets a
cell, lets call it c78, and it continues running and calculating as I
wrote it to do, but I would like it to stop and wait for data to be
entered on cell c78 which is one of the cells it passes on the run,
what should I do?
I believe it could be done in VB language.

Ihuda
 
D

Don Guillett

You are probably trying to use old lotus procedures. Probably could be a LOT
easier. Why not post your code for comments.
 
N

NickHK

Ihuda,
VBA code cannot run when the user is in Edit Mode, i.e. entering data in a
cell.
The closest you could get would be to run you code and when the cell in
question reached, exit the routine.

Do While SomeValue=true
if activecell.value="" then
sendkeys "{F2}"
exit sub
end if
Loop

But as the other replies have pointed out there are probably better ways of
achieving you goal.

NickHK
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top