+ Reply to Thread
Results 1 to 2 of 2

Generate a calendar

Hybrid View

Teralian Generate a calendar 01-07-2016, 10:05 AM
walruseggman Re: Generate a calendar 01-07-2016, 11:13 AM
  1. #1
    Registered User
    Join Date
    12-17-2015
    Location
    Prague, Czech Republic
    MS-Off Ver
    2013
    Posts
    2

    Generate a calendar

    Hello,
    please tell me how to generate a full month calendar into this table using VBA For loops. Please I am stucked here for 3 daysfff.png

  2. #2
    Forum Expert
    Join Date
    08-28-2014
    Location
    Texas, USA
    MS-Off Ver
    2016
    Posts
    1,796

    Re: Generate a calendar

    Assuming your top left cell is A1:

    Sub taralian()
    x = InputBox("What month? i.e. January = 1")
    Z = Format(DateSerial(2016, x, 1), "dddd")
    y = 1
    For i = Cells.Find(Z).Row To 7
    Cells(i, 1).Value = y
    y = y + 1
    Next
    For j = 2 To 6
        For i = 1 To 7
            Cells(i, j).Value = y
            y = y + 1
            If y > CInt(Format(DateSerial(2016, x + 1, 0), "dd")) Then Exit Sub
        Next
    Next
    End Sub
    I'm interested in starting a career working with VBA, if anyone knows of any opportunities!

+ 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. generate a month calendar on excel
    By Pmaldini3 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-23-2015, 06:24 AM
  2. How can I generate an Outlook Calendar Reminder from an Excel schedule
    By njohnn in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-09-2014, 12:53 PM
  3. Generate calendar
    By siva1218 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-01-2011, 11:44 PM
  4. Generate Calendar with Specific Dates Marked
    By emullark in forum Excel General
    Replies: 10
    Last Post: 01-07-2009, 05:16 PM
  5. [SOLVED] Using Excel to generate an Outlook Calendar Event
    By Michael in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-13-2006, 04:30 PM
  6. Spreadsheet To Auto Generate Monthly Calendar
    By ATL10SPRO in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-15-2006, 12:25 PM
  7. [SOLVED] is there a formula to generate a calendar month date rather than .
    By lmurray in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-21-2005, 12:06 PM

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