Results 1 to 4 of 4

Basic loop question

Threaded View

  1. #1
    Registered User
    Join Date
    04-11-2013
    Location
    Midlands,UK
    MS-Off Ver
    Excel 2007
    Posts
    17

    Basic loop question

    Hello,

    I'm new here and new to VBA/Programming in general, so forgive me if this question is stupid.....

    Basically, I need some advice on how to write the code below with a loop? It does exactly what I need it to do as it is, but it looks clumsy I guess and I'd like to get a basic understanding of loops etc. I've googled a few examples but so far they've flew over my head... I think with something related to what I'm doing will help me understand the terms/theory etc. better.

    Thanks in advance for any help

    ActiveCell.Value = (Date - 1)
    'ActiveCell.Offset(1, 0).Select
    'ActiveCell.Value = Date
    'ActiveCell.Offset(1, 0).Select
    'ActiveCell.Value = (Date + 1)
    'ActiveCell.Offset(1, 0).Select
    'ActiveCell.Value = (Date + 2)
    'ActiveCell.Offset(1, 0).Select
    'ActiveCell.Value = (Date + 3)
    'ActiveCell.Offset(1, 0).Select
    'ActiveCell.Value = (Date + 4)
    'ActiveCell.Offset(1, 0).Select
    'ActiveCell.Value = (Date + 5)
    'ActiveCell.Offset(1, 0).Select
    Last edited by arlu1201; 04-11-2013 at 06:29 AM. Reason: Use code tags in future.

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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