+ Reply to Thread
Results 1 to 2 of 2

Programming a simple macro that gives increased values down a column !

  1. #1
    Registered User
    Join Date
    07-02-2013
    Location
    Lahore
    MS-Off Ver
    Excel 2007
    Posts
    26

    Programming a simple macro that gives increased values down a column !

    Hi Helpers !

    I want to program a simple macro that gives increased value down the column.
    i wrote following code:

    Private Sub CommandButton1_Click()

    Sub SSHT1()

    Dim x As Integer

    For x = 1 To 10
    Cells(9, 5).Value = x - 1
    Next x
    End Sub

    i don't know
    -how to inset command button on excel worksheet ?
    -how to connect that macro with this command button so that the macro runs
    - how to make it run and see the results?

    Thanks

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Programming a simple macro that gives increased values down a column !

    Unfortunately:

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here



    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

+ 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. TO calculateAvearge of values that get increased for every 100 degree rise in temperature.
    By Dharani Suresh in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-23-2013, 07:01 AM
  2. Replies: 15
    Last Post: 02-24-2012, 05:09 PM
  3. Rounding values to specific range or increased nested if statements??
    By 311guy in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-23-2011, 12:58 PM
  4. Simple Spreadsheet programming help
    By theebookzoo in forum Excel General
    Replies: 2
    Last Post: 08-25-2008, 03:27 PM
  5. Programming a simple formula
    By anagaraj1 in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 08-04-2005, 11:05 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