+ Reply to Thread
Results 1 to 2 of 2

Fetch value from cell for VBA

  1. #1
    Forum Contributor
    Join Date
    02-24-2010
    Location
    BC, Canada
    MS-Off Ver
    Excel 2010
    Posts
    174

    Lightbulb Fetch value from cell for VBA

    I need to repeat a code every x number of seconds. I found the following link which will help me greatly: http://www.cpearson.com/excel/OnTime.aspx

    What I need help with is changing the "120" in the following code to a variable based on the value in a cell

    Please Login or Register  to view this content.
    I have a control sheet with variables so that I can easily change what the script is doing. I want this part of the code to look on the sheet named "Control". Then it basically does a vlookup where it looks in column A for "Update Interval" and then it uses the value in column B. The value in column B is what it uses in place of the "120" in the code above.

    Thanks for any help. There are a dozen other things I need this functionality for but once I see it in action for this, I'm sure I'll be able to make it work for everything else I'm doing.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Fetch value from cell for VBA

    Hello The Phil,

    Please Login or Register  to view this content.
    Somewhere in your code you can now assign cRunIntervalSeconds a value from a cell.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

+ 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. How to Auto Fetch row data upon drop down selection in a cell.
    By ankit-jain in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-07-2013, 06:27 PM
  2. [SOLVED] Fetch Data: Return Multiple Rows based on Cell Content
    By pdreyest in forum Excel General
    Replies: 8
    Last Post: 09-24-2012, 12:43 AM
  3. to fetch value from corresponding cell
    By sivasarkar in forum Excel General
    Replies: 4
    Last Post: 06-05-2012, 08:58 AM
  4. Replies: 0
    Last Post: 03-29-2012, 08:06 AM
  5. fetch value of a cell, if its row contain a value > 0
    By creamecake in forum Excel General
    Replies: 14
    Last Post: 02-06-2012, 02:30 AM

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