Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 140
Default pausing macro while cells update

I have a spreadsheet with some Reutes Wealth Manager formulas. I wish to
change the RIC code in some of these cells and then check if the code is
valid. For this i need to pause the macro while the cell/s update.

If i use Application.wait then everything pauses and the cells do not
update. I guess i need to find out what the code is to refresh the Reuters
links

Any ideas will be gratefully recieved
--
with kind regards

Spike
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,565
Default pausing macro while cells update

You can insert this snippet in where you need to pause. It will operate on
tenths of seconds as well as whole seconds. i.e. 1 for whole, 0.1 for
tenths.

s = Timer + 0.5
Do While Timer < s
DoEvents
Loop

The DoEvents allows other activity to process during the macro pause.


"Spike" wrote in message
...
I have a spreadsheet with some Reutes Wealth Manager formulas. I wish to
change the RIC code in some of these cells and then check if the code is
valid. For this i need to pause the macro while the cell/s update.

If i use Application.wait then everything pauses and the cells do not
update. I guess i need to find out what the code is to refresh the
Reuters
links

Any ideas will be gratefully recieved
--
with kind regards

Spike



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default pausing macro while cells update

Here is a typical method:

Sub WaitABit()
' do some stuff
MsgBox ("Do your thing and set Z1 when you are done")
While Range("Z1").Value = ""
DoEvents
Wend
MsgBox ("Thanks! I will proceed")
End Sub

1. we inform the User they must take some action
2. the code just loops until Z1 has been set, but the the sheet has focus to
allow User activity
3. when the User finally set Z1 to something, the code proceeds.
--
Gary''s Student - gsnu200909


"Spike" wrote:

I have a spreadsheet with some Reutes Wealth Manager formulas. I wish to
change the RIC code in some of these cells and then check if the code is
valid. For this i need to pause the macro while the cell/s update.

If i use Application.wait then everything pauses and the cells do not
update. I guess i need to find out what the code is to refresh the Reuters
links

Any ideas will be gratefully recieved
--
with kind regards

Spike

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 140
Default pausing macro while cells update

Thanks for that.

If i use a msgbox then it is fine as the macro stops and the cells update. i
am trying to avod using msgboxes as that requires User intervention to clcik
the msgbox.
--
with kind regards

Spike


"Gary''s Student" wrote:

Here is a typical method:

Sub WaitABit()
' do some stuff
MsgBox ("Do your thing and set Z1 when you are done")
While Range("Z1").Value = ""
DoEvents
Wend
MsgBox ("Thanks! I will proceed")
End Sub

1. we inform the User they must take some action
2. the code just loops until Z1 has been set, but the the sheet has focus to
allow User activity
3. when the User finally set Z1 to something, the code proceeds.
--
Gary''s Student - gsnu200909


"Spike" wrote:

I have a spreadsheet with some Reutes Wealth Manager formulas. I wish to
change the RIC code in some of these cells and then check if the code is
valid. For this i need to pause the macro while the cell/s update.

If i use Application.wait then everything pauses and the cells do not
update. I guess i need to find out what the code is to refresh the Reuters
links

Any ideas will be gratefully recieved
--
with kind regards

Spike

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default pausing macro while cells update

Then have your macro first put up a TextBox telling the User what to do and
then after the pause, remove the TextBox.


You just need to put something up so the User is given direction.
--
Gary''s Student - gsnu200909


"Spike" wrote:

Thanks for that.

If i use a msgbox then it is fine as the macro stops and the cells update. i
am trying to avod using msgboxes as that requires User intervention to clcik
the msgbox.
--
with kind regards

Spike


"Gary''s Student" wrote:

Here is a typical method:

Sub WaitABit()
' do some stuff
MsgBox ("Do your thing and set Z1 when you are done")
While Range("Z1").Value = ""
DoEvents
Wend
MsgBox ("Thanks! I will proceed")
End Sub

1. we inform the User they must take some action
2. the code just loops until Z1 has been set, but the the sheet has focus to
allow User activity
3. when the User finally set Z1 to something, the code proceeds.
--
Gary''s Student - gsnu200909


"Spike" wrote:

I have a spreadsheet with some Reutes Wealth Manager formulas. I wish to
change the RIC code in some of these cells and then check if the code is
valid. For this i need to pause the macro while the cell/s update.

If i use Application.wait then everything pauses and the cells do not
update. I guess i need to find out what the code is to refresh the Reuters
links

Any ideas will be gratefully recieved
--
with kind regards

Spike



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 140
Default pausing macro while cells update

Thank you both for that, i will try on monday as do not have the connection
to Reuters here
--
with kind regards

Spike


"JLGWhiz" wrote:

You can insert this snippet in where you need to pause. It will operate on
tenths of seconds as well as whole seconds. i.e. 1 for whole, 0.1 for
tenths.

s = Timer + 0.5
Do While Timer < s
DoEvents
Loop

The DoEvents allows other activity to process during the macro pause.


"Spike" wrote in message
...
I have a spreadsheet with some Reutes Wealth Manager formulas. I wish to
change the RIC code in some of these cells and then check if the code is
valid. For this i need to pause the macro while the cell/s update.

If i use Application.wait then everything pauses and the cells do not
update. I guess i need to find out what the code is to refresh the
Reuters
links

Any ideas will be gratefully recieved
--
with kind regards

Spike



.

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 140
Default pausing macro while cells update

Thank you the Do while Timer loop worked fine with a two second delay.

Very much appreciated
--
with kind regards

Spike


"Spike" wrote:

Thank you both for that, i will try on monday as do not have the connection
to Reuters here
--
with kind regards

Spike


"JLGWhiz" wrote:

You can insert this snippet in where you need to pause. It will operate on
tenths of seconds as well as whole seconds. i.e. 1 for whole, 0.1 for
tenths.

s = Timer + 0.5
Do While Timer < s
DoEvents
Loop

The DoEvents allows other activity to process during the macro pause.


"Spike" wrote in message
...
I have a spreadsheet with some Reutes Wealth Manager formulas. I wish to
change the RIC code in some of these cells and then check if the code is
valid. For this i need to pause the macro while the cell/s update.

If i use Application.wait then everything pauses and the cells do not
update. I guess i need to find out what the code is to refresh the
Reuters
links

Any ideas will be gratefully recieved
--
with kind regards

Spike



.

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
Pausing a macro Alex.W Excel Discussion (Misc queries) 2 August 10th 07 11:30 AM
Pausing Macro Patches New Users to Excel 2 March 28th 07 03:00 AM
Pausing a macro [email protected] Excel Programming 3 October 5th 06 02:49 PM
pausing a macro Hasan Cansü[_2_] Excel Programming 6 February 27th 04 06:40 PM
Pausing a VBA macro Dean Taylor Excel Programming 1 August 1st 03 05:44 PM


All times are GMT +1. The time now is 07:38 PM.

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

About Us

"It's about Microsoft Excel"