+ Reply to Thread
Results 1 to 2 of 2

Inserting A Monthly Calendar

  1. #1
    Registered User
    Join Date
    10-19-2005
    Posts
    4

    Inserting A Monthly Calendar

    Can anyone tell me how to input a monthly calendar in Excel with the current date highlighted? I just need something basic.

  2. #2
    Forum Expert swatsp0p's Avatar
    Join Date
    10-07-2004
    Location
    Kentucky, USA
    MS-Off Ver
    Excel 2010
    Posts
    1,545
    I don't know of anything "basic" for a calendar. Any solution will require VBA as Excel does not have a built in calendar.

    Do you want a SHEET that is a calendar that you can enter data into? (you can download one from Chip Pearson's site here: http://www.cpearson.com/excel/download.htm Choose Calendar from the list of available downloads and follow the instructions)

    Do you want a calendar that 'pops up' when a specific cell is selected?[vba]
    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    If Target.Cells.Count > 1 Then Exit Sub
    ' set the Range below to the cell you want to select to pop up the calendar
    If Not Application.Intersect(Range("A1"), Target) Is Nothing Then
    Calendar1.Left = Target.Left + Target.Width - Calendar1.Width
    Calendar1.Top = Target.Top + Target.Height
    Calendar1.Visible = True
    ' select Today's date in the Calendar
    Calendar1.Value = Date
    Else: Calendar1.Visible = False
    End If
    End Sub[/vba] Entered in the Worksheet project in the VBA Editor where you want it displayed (Today's date will be highlighted).

    If desired: [vba]
    Private Sub Calendar1_Click()
    ActiveCell.Value = CDbl(Calendar1.Value)
    ActiveCell.NumberFormat = "dd-mmm"
    ActiveCell.Select
    End Sub[/vba] will enter the selected date (by clicking on the calendar) into the target cell specified in the previous code as "Range".


    Will one of these meet your needs?


    More info, please.
    Bruce
    The older I get, the better I used to be.
    USA

+ Reply to Thread

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