Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default stop a macro to enter data to the cell I want


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


*** Sent via Developersdex http://www.developersdex.com ***
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default stop a macro to enter data to the cell I want

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

"Ihuda Bunzl" wrote in message
...

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


*** Sent via Developersdex http://www.developersdex.com ***



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Stop next cell being selected on Enter Ken G. Excel Discussion (Misc queries) 2 December 6th 05 07:21 AM
Stop next cell being selected on Enter Jeff Stevens Excel Discussion (Misc queries) 0 December 6th 05 06:55 AM
enter data in cell which will start macro to move data to sheet2 Tommy Excel Discussion (Misc queries) 0 May 12th 05 05:00 PM
Pause Macro to enter data in cell Frank Kabel Excel Programming 4 May 30th 04 10:56 PM
Pause Macro to enter data in cell Bob Phillips[_6_] Excel Programming 0 May 28th 04 04:41 PM


All times are GMT +1. The time now is 03:08 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"