Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Error in Personal.xls - calendar

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Error in Personal.xls - calendar

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

Stee n wrote:

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


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error in Calendar tool - Compile Error Steen Excel Programming 1 January 14th 08 06:03 PM
Loading a calendar (user form) from another project (personal.xls) Ollie[_2_] Excel Programming 1 September 25th 05 09:33 PM
personal macro workbook error GJP99 Excel Programming 1 April 28th 05 01:22 AM
Personal Settings Causing Error? JRH Excel Programming 2 July 30th 04 09:03 PM
runtime error 91 in Personal.xls - no clue! Dominique Schroeder Excel Programming 0 April 5th 04 07:50 PM


All times are GMT +1. The time now is 07:05 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"