View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
[email protected] riccifs@tin.it is offline
external usenet poster
 
Posts: 37
Default Calendar control size trouble!

On 3 Dic, 22:39, "Ron de Bruin" wrote:
Hi Stefano

Delete the control
Save the workbook
Add the control
Save the workbook again

Is it working OK now ?

--

Regards Ron de Bruinhttp://www.rondebruin.nl/tips.htm

wrote in ...
On 3 Dic, 18:37, "Ron de Bruin" wrote:
Hi Stefano


Do you change the Zoom of the worksheet < 100 ?


Try to delete the control and add it again


--


Regards Ron de Bruinhttp://www.rondebruin.nl/tips.htm


wrote in ...
Hi to everyone,
I'm using this code to add dates in a rage of cells. It uses a
calendar control to fill in dates.
I found it to this web-site:http://www.rondebruin.nl/calendar.htm


It's working well but the only problem is that:
When the calendar pops up it shrinks its size every time I try to open
the workbook.
I mean, I chose its size, of course, I save the excel file and when I
reopen it, the calendar control form have a smaller size with respect
to the one I set up previously!
What I am missing to do? May be I just doing something stupid but I
can't go out from this clue!


Hope someone will help me!
Bye,
Stefano.


***start code***
Private Sub Calendar1_Click()
ActiveCell.Value = 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("D2:D71"), 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
If Not IsDate(Target.Value) Then
Calendar1.Value = Date
Else
Calendar1.Value = Target.Value
End If
ElseIf Calendar1.Visible Then Calendar1.Visible = False
End If
End Sub
***end code***


Hi Ron,
first of all many thanks to answered me.


I usually have the zoom factor of the worksheet to 85%, I deleted the
control and added it again but I'm still having the problems.
But if I try to apply your code in a new clean worksheet the problems
seems to disappear...


Let me ask you just one more thing; In the cells (E2:E71) near the
ones the calendar control is applied I insert this formula
=IF(D17="";"";GIORNO.LAVORATIVO(D17;10)). Could be this the problems?
I mean, could this to interfere with the control.


Bye,
Stefano.


Hi Ron,
I think the problems is when I try to insert the control on each
sheets of the same workbook.

In any case many thanks the same for your help.
Bye,
Stefano.