Results 1 to 3 of 3

How to Auto-increment a cell value at user defined periodic interval?

Threaded View

excellearner20 How to Auto-increment a cell... 08-26-2020, 10:46 PM
alansidman Re: How to Auto-increment a... 08-26-2020, 10:50 PM
excellearner20 Re: How to Auto-increment a... 08-26-2020, 11:30 PM
  1. #1
    Registered User
    Join Date
    05-23-2020
    Location
    mumbai
    MS-Off Ver
    MS OFFICE PROFESSIONAL 2013
    Posts
    6

    How to Auto-increment a cell value at user defined periodic interval?

    Hi friends,
    Can you please help me with this problem?

    Say, cell A2 has value 5.
    I want to auto increment A2 by 1 every 3 seconds.

    How to achieve this? I tried below code I found over net, but it didn't do anything.

    Sub CellTimer()
    
        Sheet1.Range("A2").Value = 5
        Do
            Application.Wait (Now() + TimeValue("0:00:03"))
            Sheet1.Range("A2").Value = Sheet1.Range("A2").Value + 1
        Loop
    
    End Sub

    Subsequently, once above problem is solved... I want Excel to take Auto increment interval from another cell. SO, once I change that cell value, interval will change and I do not need to change VBA module.

    Thanks
    Last edited by alansidman; 08-26-2020 at 10:49 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Purchase Order Number - Auto increment to last row value +1 AFTER user defined valu
    By sryadav12 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 04-26-2019, 09:59 AM
  2. [SOLVED] VBA: Auto-fill cells based on user defined values and quantity
    By Dracius in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-24-2018, 03:46 PM
  3. VBA error with auto fill of user defined formula
    By dquigley in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-24-2018, 12:20 PM
  4. [SOLVED] Auto increment numbers on an Excel user form
    By cinstanl in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 09-06-2016, 10:09 AM
  5. User-Defined Function Auto-Completes but gives #NAME? Errors
    By jjouett in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-18-2016, 07:46 AM
  6. Auto save IE file download dialog box in a user defined path
    By sugaprasad in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-27-2014, 05:21 AM
  7. embedding user-defined hyperlink into auto-generated email
    By kuraitori in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-17-2008, 10:49 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