Date Picker won't work in Excel for Mac 2011

markpickford

New Member
Joined
Jul 11, 2012
Messages
1
Hi,

This is my first post and I hope someone can help me. I am a complete novice with excel, macros and VBA, but by borrowing ideas and finding scripts from various sources I have been able to put together an expenses spreadsheet for my business that works as I want it to.

I have recently moved to Excel 2011 (mac) from Excel 2007 (PC) and the date picker part of my spreadsheet will not work.

The code is below:

Private Sub Calendar1_Click()
ActiveCell.Value = CDbl(Calendar1.Value)
ActiveCell.Select
Calendar1.Visible = False
End Sub

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Not Application.Intersect(Range("A9:A28,A34:A53"), 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
ElseIf Calendar1.Visible Then Calendar1.Visible = False
End If
End Sub

The first error I get when running it is "Compile Error Can't Find Project or Library'.

If I then click "OK", 'Run and then 'Reset' I can view the available librarys and those that are ticked are :

  • Visual Basic for Applications
  • Microsoft Excel 14.0 Object Library
  • OLE Automation
  • Microsoft Office 14.0 Object Library
  • Missing: Microsoft Windows Common Controls 0 2.6.0 (SP4)

If I untick the last, missing, one (as advised on another site) I get an error 'Runtime Error 424 - Object Required.

I am at a complete loss to understand the problem and would welcome any help that can be offered.

Thanks in advance.

Mark
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
You seem to have a lot more IF than End If statements. I think ElseIF should be Else If.
 
Upvote 0

Forum statistics

Threads
1,214,591
Messages
6,120,428
Members
448,961
Latest member
nzskater

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top