Results 1 to 1 of 1

Vba code to add column to worksheet

Threaded View

becky halsey Vba code to add column to... 09-09-2016, 05:43 PM
  1. #1
    Registered User
    Join Date
    03-03-2016
    Location
    west liberty, ky
    MS-Off Ver
    2010
    Posts
    3

    Vba code to add column to worksheet

    I have a spread sheet that inserts a blank row each time I enter information into the next to the last row. Now I need a code to insert a new column each time I reach a specific place. I am also wanting to auto adjust the print area according to the last cell used. Each sheet will be different. I am using the following code for inserting the row. Thanks in advance for your help!

    Private Sub Worksheet_Change(ByVal Target As Range)
       If Target.Row = [TotalVal].Row - 1 Then
          Application.EnableEvents = False
          [TotalVal].EntireRow.Insert
          Application.EnableEvents = True
       End If
    End Sub
    Last edited by jeffreybrown; 09-09-2016 at 06:02 PM. Reason: Please use code tags

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 5
    Last Post: 08-01-2014, 04:30 PM
  2. [SOLVED] Trying to find the right code to copy a column from one worksheet and paste to another
    By mw91 in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 11-15-2013, 01:57 PM
  3. [SOLVED] VBA code for copying worksheet name to column
    By sandeepafpl in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 10-03-2012, 09:29 AM
  4. Replies: 3
    Last Post: 07-18-2012, 04:25 PM
  5. Worksheet Code to react to column change
    By lealea1982 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-05-2011, 01:08 PM
  6. Code Repair - Copy Column to New Worksheet and Delet
    By RobGair in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-12-2010, 03:01 PM
  7. Code Repair - Copy Column to New Worksheet and Delete
    By RobGair in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-09-2010, 03:03 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