Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 136
Default Pop up calender issue

Hi,

I have the following code for a pop up calender

Private Sub Calendar1_Click()
ActiveCell.Value = CDbl(Calendar1.Value)
ActiveCell.NumberFormat = "dd/mm/yyyy"
ActiveCell.Select
If Calendar1.Value Then
Calendar1.Visible = False
End If

End Sub


Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells.Count 1 Then Exit Sub
If Not Application.Intersect(Range("A4:A52052"), Target) Is Nothing Then
Calendar1.Top = Target.Left + Target.Width
Calendar1.Top = Target.Top + Target.Height
Calendar1.Visible = True
Calendar1.Value = Date
ElseIf Calendar1.Visible Then Calendar1.Visible = False
End If


End Sub

Which works fine until I try to Share the work book then a runtime error
occurs.

Any help would be appreciated,

Thanks,

Gav.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,092
Default Pop up calender issue

If you mean "Share" as setting the workbook as "Shared" and putting it on a
common drive for others to share, macros will not run in a shared workbook.
If you mean to send the file or just put it on a common drive without
setting it for "Shared", then the user may be missing the mscal.ocx file.
Read this link on the Calendar file:
http://www.fontstuff.com/mailbag/qvba01.htm

Mike F
"Gav123" wrote in message
...
Hi,

I have the following code for a pop up calender

Private Sub Calendar1_Click()
ActiveCell.Value = CDbl(Calendar1.Value)
ActiveCell.NumberFormat = "dd/mm/yyyy"
ActiveCell.Select
If Calendar1.Value Then
Calendar1.Visible = False
End If

End Sub


Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells.Count 1 Then Exit Sub
If Not Application.Intersect(Range("A4:A52052"), Target) Is Nothing
Then
Calendar1.Top = Target.Left + Target.Width
Calendar1.Top = Target.Top + Target.Height
Calendar1.Visible = True
Calendar1.Value = Date
ElseIf Calendar1.Visible Then Calendar1.Visible = False
End If


End Sub

Which works fine until I try to Share the work book then a runtime error
occurs.

Any help would be appreciated,

Thanks,

Gav.




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
pop up calender PT 2 Norm Excel Discussion (Misc queries) 1 April 28th 10 07:35 PM
Calender Pop-Up Frikkels Excel Discussion (Misc queries) 2 October 21st 09 09:29 AM
Issue when accessing the property/method of a Calender control Anand Excel Programming 0 January 12th 07 05:36 AM
CALENDER smickParisTX Excel Discussion (Misc queries) 0 January 19th 06 06:19 PM
Calender Help Greg B[_5_] Excel Programming 1 May 4th 05 01:49 PM


All times are GMT +1. The time now is 03:36 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"