+ Reply to Thread
Results 1 to 2 of 2

Add row in existing VBA code

  1. #1
    Registered User
    Join Date
    08-10-2016
    Location
    Sweden
    MS-Off Ver
    2011
    Posts
    1

    Question Add row in existing VBA code

    I am trying to use a VBA code that generates a montly calender. The problem is that in the code only generates 1 entry cell for each day and I want 5 rows. The code for the entry cells looks as below.. Any suggestions on what I can do to the code in order to get more entry cells?

    Create Entry cells, format them centered, wrap text, and border
    ' around days.
    For x = 0 To 5
    Range("A4").Offset(x * 2, 0).EntireRow.Insert
    With Range("A4:G4").Offset(x * 2, 0)
    .RowHeight = 65
    .HorizontalAlignment = xlCenter
    .VerticalAlignment = xlTop
    .WrapText = True
    .Font.Size = 10
    .Font.Bold = False
    ' Unlock these cells to be able to enter text later after
    ' sheet is protected.
    .Locked = False
    End With

  2. #2
    Valued Forum Contributor abduljaleel.mca's Avatar
    Join Date
    02-13-2013
    Location
    Chennai, India
    MS-Off Ver
    MS 365 Business
    Posts
    326

    Re: Add row in existing VBA code

    Do you mean this?
    Please Login or Register  to view this content.

+ 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. update existing code to copy and KEEP existing data
    By scott micklo in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 01-26-2016, 05:41 PM
  2. [SOLVED] VBA code to save current worksheet as temporary PDF file and then add to my existing code
    By brianfromla in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-20-2014, 08:35 AM
  3. Replies: 2
    Last Post: 12-17-2013, 11:51 AM
  4. [SOLVED] Correct way to apply an existing VBA code to an existing sheet
    By JO505 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-05-2013, 05:42 PM
  5. Replies: 2
    Last Post: 03-17-2011, 08:55 PM
  6. Replies: 1
    Last Post: 08-15-2009, 05:52 AM

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