Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 51
Default Pick a date from a cell drop down calendar

I have put a calendar pop up in a cell after looking how on
http://www.rondebruin.nl/calendar.htm

It all works for me and most others, but some people are getting a vb error
not just on this cell but all cells. The error is Compile Error" "Can't find
project or library".

It has been sugested that the error is due to the Calendar control being a
part of Access ? Is this true ? If so is there a way around this as I can't
ask people to install Access?

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,123
Default Pick a date from a cell drop down calendar

Hi Paul

Yes that is true
See the link I have on my site to the page with the useform example
you can download the control there if you want

--
Regards Ron de Bruin
http://www.rondebruin.nl



"Paul Dennis" wrote in message ...
I have put a calendar pop up in a cell after looking how on
http://www.rondebruin.nl/calendar.htm

It all works for me and most others, but some people are getting a vb error
not just on this cell but all cells. The error is Compile Error" "Can't find
project or library".

It has been sugested that the error is due to the Calendar control being a
part of Access ? Is this true ? If so is there a way around this as I can't
ask people to install Access?



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 51
Default Pick a date from a cell drop down calendar

I replaced the code but it didn't make any difference

from:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$I$30" Then 'Change this
Calendar1.Visible = True
Calendar1.Value = Date
Else
Calendar1.Visible = False
End If
End Sub

to:

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

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells.Count 1 Then Exit Sub
If Not Application.Intersect(Range("I30"), 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

"Ron de Bruin" wrote:

Hi Paul

Yes that is true
See the link I have on my site to the page with the useform example
you can download the control there if you want

--
Regards Ron de Bruin
http://www.rondebruin.nl



"Paul Dennis" wrote in message ...
I have put a calendar pop up in a cell after looking how on
http://www.rondebruin.nl/calendar.htm

It all works for me and most others, but some people are getting a vb error
not just on this cell but all cells. The error is Compile Error" "Can't find
project or library".

It has been sugested that the error is due to the Calendar control being a
part of Access ? Is this true ? If so is there a way around this as I can't
ask people to install Access?




  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,123
Default Pick a date from a cell drop down calendar

???

It has been sugested that the error is due to the Calendar control being a
part of Access ? Is this true ? If so is there a way around this as I can't
ask people to install Access?


See
http://www.fontstuff.com/mailbag/qvba01.htm



--
Regards Ron de Bruin
http://www.rondebruin.nl



"Paul Dennis" wrote in message ...
I replaced the code but it didn't make any difference

from:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$I$30" Then 'Change this
Calendar1.Visible = True
Calendar1.Value = Date
Else
Calendar1.Visible = False
End If
End Sub

to:

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

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells.Count 1 Then Exit Sub
If Not Application.Intersect(Range("I30"), 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

"Ron de Bruin" wrote:

Hi Paul

Yes that is true
See the link I have on my site to the page with the useform example
you can download the control there if you want

--
Regards Ron de Bruin
http://www.rondebruin.nl



"Paul Dennis" wrote in message ...
I have put a calendar pop up in a cell after looking how on
http://www.rondebruin.nl/calendar.htm

It all works for me and most others, but some people are getting a vb error
not just on this cell but all cells. The error is Compile Error" "Can't find
project or library".

It has been sugested that the error is due to the Calendar control being a
part of Access ? Is this true ? If so is there a way around this as I can't
ask people to install Access?






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
How do I create a schedule from a list of dates ? Gavin Morris Charts and Charting in Excel 2 October 28th 10 04:08 PM
how do i pick A date for a cell from a drop down calendar? JLE Excel Discussion (Misc queries) 5 September 19th 06 12:48 PM
Mileage Claim Formula johndavies New Users to Excel 4 August 14th 06 09:24 AM
Set a cell to have a pop-up calendar for date selection in Excel? Michigander-77 Excel Worksheet Functions 2 July 14th 05 11:51 PM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


All times are GMT +1. The time now is 10:24 AM.

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"