Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Mike Rogers
 
Posts: n/a
Default Worksheet object (Calendar)

xl2k
I have a worksheet that I have placed the calendar control 9.0. I have vba
that calls the calendar and hides it after the date is selected. Everything
about the worksheet works great! The problem that I am having is that
everytime the worksheet is opened the calendar is a tinny bit smaller. So
after it is opened and closed a number of times it is so small and distorted
that you can not read the dates. So I have to go into design mode and resize
it larger and save it. Then it starts all over again, and starts getting
smallereverytime it is opened . Any ideas?????

Mike Rogers


  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default Worksheet object (Calendar)

I've never experienced anything like this, but how about just placing the
calendar where you want it each time the workbook opens.

Option Explicit
Sub auto_open()

Dim myCC As OLEObject
Dim myRng As Range

With Worksheets("Sheet1")
Set myCC = .OLEObjects("calendar1")
Set myRng = .Range("b3:c9")
myCC.Top = myRng.Top
myCC.Left = myRng.Left
myCC.Width = myRng.Width
myCC.Height = myRng.Height
End With

End Sub

(Or resize it or whatever you need to do)

Mike Rogers wrote:

xl2k
I have a worksheet that I have placed the calendar control 9.0. I have vba
that calls the calendar and hides it after the date is selected. Everything
about the worksheet works great! The problem that I am having is that
everytime the worksheet is opened the calendar is a tinny bit smaller. So
after it is opened and closed a number of times it is so small and distorted
that you can not read the dates. So I have to go into design mode and resize
it larger and save it. Then it starts all over again, and starts getting
smallereverytime it is opened . Any ideas?????

Mike Rogers


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
Mike Rogers
 
Posts: n/a
Default Worksheet object (Calendar)

Dave

Thanks for the advise, and the code. I resized larger than I usually do and
placed the code and it seems to be working. I will really find out over
time. As a follow up note this same thing is occuring on at least six
separate pc's or laptops. It is a timesheet that was developed in xl2k and
is also running on all machines with xl2k. Thanks again Dave I do appreciate
all of your contributions on this sight.

Mike Rogers

"Dave Peterson" wrote:

I've never experienced anything like this, but how about just placing the
calendar where you want it each time the workbook opens.

Option Explicit
Sub auto_open()

Dim myCC As OLEObject
Dim myRng As Range

With Worksheets("Sheet1")
Set myCC = .OLEObjects("calendar1")
Set myRng = .Range("b3:c9")
myCC.Top = myRng.Top
myCC.Left = myRng.Left
myCC.Width = myRng.Width
myCC.Height = myRng.Height
End With

End Sub

(Or resize it or whatever you need to do)

Mike Rogers wrote:

xl2k
I have a worksheet that I have placed the calendar control 9.0. I have vba
that calls the calendar and hides it after the date is selected. Everything
about the worksheet works great! The problem that I am having is that
everytime the worksheet is opened the calendar is a tinny bit smaller. So
after it is opened and closed a number of times it is so small and distorted
that you can not read the dates. So I have to go into design mode and resize
it larger and save it. Then it starts all over again, and starts getting
smallereverytime it is opened . Any ideas?????

Mike Rogers


--

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
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
use of calendar object? CathyZ Excel Discussion (Misc queries) 1 May 4th 06 07:14 PM
How do I insert an object onto a protected worksheet? Arthur.awg Excel Discussion (Misc queries) 0 March 21st 06 01:36 PM
Calendar - change of a size of this object Drahos Excel Worksheet Functions 1 February 14th 06 06:01 PM
Macro to search for and display data in another worksheet Mark H Excel Worksheet Functions 0 June 14th 05 12:40 PM


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

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

About Us

"It's about Microsoft Excel"