Results 1 to 6 of 6

Macro: insert a row

Threaded View

  1. #1
    Registered User
    Join Date
    11-04-2011
    Location
    Holland
    MS-Off Ver
    Excel 2003
    Posts
    2

    Macro: insert a row

    Hi all,

    I've attached an example of my monthly costsoverview.

    For each costscategory there's a commandbutton.
    I like to create a macro that insert a row between the last product and the row with total.
    For costscategory 100 should that between row 9 and 10.

    It's easy to create a macro for just one costscategory:

    Private Sub CommandButton1_Click()
    Range("B50").End(xlUp).Select
    Range(Selection, Selection.End(xlToRight)).Select
    Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove

    End Sub


    But in this example there are 4 categories and 4 commandbutton...

    Is this possible?

    Thanks in advance.
    Attached Files Attached Files
    Last edited by Neocon; 11-04-2011 at 07:30 AM.

Thread Information

Users Browsing this Thread

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

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