+ Reply to Thread
Results 1 to 8 of 8

Looping cannot be set to 1 mintues interval

  1. #1
    Registered User
    Join Date
    01-06-2013
    Location
    HK
    MS-Off Ver
    Excel 2003
    Posts
    32

    Looping cannot be set to 1 mintues interval

    Sub AUTOREFRECH()
    Dim c As Range
    Do Until Range("a1").Value = "STOP"
    For Each c In Range("A7:A7")
    c = c
    Next
    Loop
    End Sub



    i want to to is edit A7 and then enter every one to two minutes unit forever, is it possible to do it?

  2. #2
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Looping cannot be set to 1 mintues interval

    cherrychan,

    I'm afraid I don't understand what you need. You are taking the value from A7 and pasting it into itself, until Cell A1 says "stop" but how does the cell A1 change?

    To put in a delay/pause try:

    Please Login or Register  to view this content.
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  3. #3
    Registered User
    Join Date
    01-06-2013
    Location
    HK
    MS-Off Ver
    Excel 2003
    Posts
    32

    Re: Looping cannot be set to 1 mintues interval

    Sub AUTOREFRECH()
    Dim c As Range
    For Each c In Range("A7:A7")
    c = c
    Next
    End Sub

    A7 B7 C7
    A 0.01 0.02

    the dataset is from website, and changing with time, but this excal cannot update automaticly, onlyway is edit A7, unchange A, and then enter again, the new value of B7 and C7 will update.

    so i add the macao that hope can refresh automately every minitute, let the data move. sorry for my poor english adn thank for your help

  4. #4
    Registered User
    Join Date
    01-06-2013
    Location
    HK
    MS-Off Ver
    Excel 2003
    Posts
    32

    Re: Looping cannot be set to 1 mintues interval

    Sorry , how to add Application.Wait Now + TimeValue("00:00:01") in inside?

    Sub AUTOREFRECH()
    Dim c As Range
    For Each c In Range("A7:A7")
    c = c
    Next
    End Sub

  5. #5
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Looping cannot be set to 1 mintues interval

    I see you took out the Do...Until loop. Now the macro will update A7 once and finish... is that intended? Is another macro calling this one? If not then put your code as it was...

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    01-06-2013
    Location
    HK
    MS-Off Ver
    Excel 2003
    Posts
    32

    Re: Looping cannot be set to 1 mintues interval

    Thnak you so much, arkadi, is work.. thanks

  7. #7
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Looping cannot be set to 1 mintues interval

    You're welcome. Please mark the post as solved?

  8. #8
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Looping cannot be set to 1 mintues interval

    I don't see how one can change the value in A1. While Application.Wait is running, the user can't change a cell's value.
    Perhaps this would work better.

    Please Login or Register  to view this content.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 1
    Last Post: 04-29-2014, 04:42 AM
  2. want to conver 1.45 in to mintues
    By anjana arora in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-12-2014, 03:55 PM
  3. [SOLVED] How to make an interval and search for values within that interval?
    By gamoerma in forum Excel General
    Replies: 12
    Last Post: 10-13-2013, 10:33 AM
  4. looping at regular interval
    By grime in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-25-2006, 05:00 PM
  5. [SOLVED] how to I add running hours & mintues in Excel
    By Thomas in forum Excel General
    Replies: 2
    Last Post: 04-01-2005, 11:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1