+ Reply to Thread
Results 1 to 2 of 2

Syntax Error adding Date Picker to a range

  1. #1
    Registered User
    Join Date
    05-06-2005
    Posts
    30

    Syntax Error adding Date Picker to a range

    I'm trying to add the date picker to a range of cells per the instructions on a msdn developer web page and am getting a syntax error, can someone help

    Private Sub ExcelRangeAddDateTimePicker()

    Dim DateTimePicker1 As Microsoft.Office.Tools. _
    Excel.Controls.DateTimePicker = Me.Controls. _
    AddDateTimePicker(Me.Range("A1", "C1"), _
    "DateTimePicker1")
    DateTimePicker1.CalendarMonthBackground = _
    Color.LightBlue

    End Sub

    Here's the link

    http://msdn2.microsoft.com/en-us/lib...1h(VS.80).aspx

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,202
    That's not VBA code, it's VB
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

+ 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