Error in Personal.xls - calendar

S

Stee n

Hi all

I have just got a new computer and have moved my Personal.xls file to it. It
works ok, but now I got an error in the calander tool in Personal.xls:

Private Sub Workbook_Open()
=> Dim NewControl As CommandBarControl ;THIS IS WHERE THE DEBUGGE STOPS

' Assign shortcut to display calendar on SHIFT+CTRL+C
Application.OnKey "+^{C}", "Module1.OpenCalendar"
' Add item to shortcut menu on open
On Error Resume Next
Application.CommandBars("Cell").Controls("Insert Date").Delete
On Error GoTo 0
Set NewControl = Application.CommandBars("Cell").Controls.Add
With NewControl
.Caption = "Insert Date"
.OnAction = "Module1.OpenCalendar"
.BeginGroup = True
End With
End Sub

Can anyone give me some advise of what to do to eliminate this error?

/Steen
 
D

Dave Peterson

Open your workbook
Go to the VBE
Select your workbook's project
Tools|References
Make sure: "Microsoft Office xx.0 Object Library" is checked
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top