what type is calendar control

running Excel 2003 (going to 2007 in the next few months)

I have inserted a pop-up calendar (Insert/Object.../Calendar Control
11.0). No problems getting it to do what I want - except when I
declare my variables (Option Explicit).

I can't seem to determine what type the Calendar object is - Dim
Calendar as Object returns a "Block Not Set" error.

Any sugegstions?

Art
0
c1802362
11/16/2009 1:55:00 PM
excel.programming 6508 articles. 2 followers. Follow

6 Replies
871 Views

Similar Articles

[PageSpeed] 12

You put this calendar control directly on the worksheet, not a UserForm, 
correct? I think you can do it this way...

Dim MyCalendar As Object
Set MyCalendar = Worksheets("Sheet2").OLEObjects("Calendar1").Object
MsgBox MyCalendar.Value

-- 
Rick (MVP - Excel)


"c1802362" <c1802362@cox.net> wrote in message 
news:78012296-7c10-4576-8b14-f38f3272c0f6@f20g2000vbl.googlegroups.com...
> running Excel 2003 (going to 2007 in the next few months)
>
> I have inserted a pop-up calendar (Insert/Object.../Calendar Control
> 11.0). No problems getting it to do what I want - except when I
> declare my variables (Option Explicit).
>
> I can't seem to determine what type the Calendar object is - Dim
> Calendar as Object returns a "Block Not Set" error.
>
> Any sugegstions?
>
> Art 

0
Rick
11/16/2009 3:56:50 PM
Art,

This works for me:

Private Sub Calendar1_Click()
Dim myCal As Calendar
Set myCal = Calendar1
MsgBox myCal.Value
End Sub


HTH,
Bernie
MS Excel MVP


"c1802362" <c1802362@cox.net> wrote in message 
news:78012296-7c10-4576-8b14-f38f3272c0f6@f20g2000vbl.googlegroups.com...
> running Excel 2003 (going to 2007 in the next few months)
>
> I have inserted a pop-up calendar (Insert/Object.../Calendar Control
> 11.0). No problems getting it to do what I want - except when I
> declare my variables (Option Explicit).
>
> I can't seem to determine what type the Calendar object is - Dim
> Calendar as Object returns a "Block Not Set" error.
>
> Any sugegstions?
>
> Art 


0
Bernie
11/16/2009 3:56:54 PM
On Nov 16, 10:56=A0am, "Rick Rothstein"
<rick.newsNO.S...@NO.SPAMverizon.net> wrote:
> You put this calendar control directly on the worksheet, not a UserForm,
> correct? I think you can do it this way...
>
> Dim MyCalendar As Object
> Set MyCalendar =3D Worksheets("Sheet2").OLEObjects("Calendar1").Object
> MsgBox MyCalendar.Value
>
> --
> Rick (MVP - Excel)
>
> "c1802362" <c1802...@cox.net> wrote in message
>
> news:78012296-7c10-4576-8b14-f38f3272c0f6@f20g2000vbl.googlegroups.com...
>
>
>
> > running Excel 2003 (going to 2007 in the next few months)
>
> > I have inserted a pop-up calendar (Insert/Object.../Calendar Control
> > 11.0). No problems getting it to do what I want - except when I
> > declare my variables (Option Explicit).
>
> > I can't seem to determine what type the Calendar object is - Dim
> > Calendar as Object returns a "Block Not Set" error.
>
> > Any sugegstions?
>
> > Art

yes - the code puts it directly on the page when the user clicks in
the referenced cell

Art
0
c1802362
11/17/2009 1:11:44 AM
On Nov 16, 10:56=A0am, "Bernie Deitrick" <deitbe @ consumer dot org>
wrote:
> Art,
>
> This works for me:
>
> Private Sub Calendar1_Click()
> Dim myCal As Calendar
> Set myCal =3D Calendar1
> MsgBox myCal.Value
> End Sub
>
> HTH,
> Bernie
> MS Excel MVP
>
> "c1802362" <c1802...@cox.net> wrote in message
>
> news:78012296-7c10-4576-8b14-f38f3272c0f6@f20g2000vbl.googlegroups.com...
>
>
>
> > running Excel 2003 (going to 2007 in the next few months)
>
> > I have inserted a pop-up calendar (Insert/Object.../Calendar Control
> > 11.0). No problems getting it to do what I want - except when I
> > declare my variables (Option Explicit).
>
> > I can't seem to determine what type the Calendar object is - Dim
> > Calendar as Object returns a "Block Not Set" error.
>
> > Any sugegstions?
>
> > Art

I'll try this, but when I started typing my Dim statement (Dim
Calendar1 As ....) I couldn't get an object description with Calender
in it

(Which is why I asked the question in the first place - thanks!)
0
c1802362
11/17/2009 1:14:43 AM
Once you add the calendar to your sheet, double click it, and then the 
calendar click event code window will open and you can type

Dim Calendar1 As Cal

and the Calendar object type will be available in the autocomplete of the 
declaration.

Bernie


"c1802362" <utay1@cox.net> wrote in message 
news:1734d8ff-e752-46a0-ba78-483a22042e0f@v25g2000yqk.googlegroups.com...
On Nov 16, 10:56 am, "Bernie Deitrick" <deitbe @ consumer dot org>
wrote:
> Art,
>
> This works for me:
>
> Private Sub Calendar1_Click()
> Dim myCal As Calendar
> Set myCal = Calendar1
> MsgBox myCal.Value
> End Sub
>
> HTH,
> Bernie
> MS Excel MVP
>
> "c1802362" <c1802...@cox.net> wrote in message
>
> news:78012296-7c10-4576-8b14-f38f3272c0f6@f20g2000vbl.googlegroups.com...
>
>
>
> > running Excel 2003 (going to 2007 in the next few months)
>
> > I have inserted a pop-up calendar (Insert/Object.../Calendar Control
> > 11.0). No problems getting it to do what I want - except when I
> > declare my variables (Option Explicit).
>
> > I can't seem to determine what type the Calendar object is - Dim
> > Calendar as Object returns a "Block Not Set" error.
>
> > Any sugegstions?
>
> > Art

I'll try this, but when I started typing my Dim statement (Dim
Calendar1 As ....) I couldn't get an object description with Calender
in it

(Which is why I asked the question in the first place - thanks!) 

0
Bernie
11/17/2009 1:29:32 AM
And I forgot to add that inserting a calendar control automatically adds a 
reference to the calendar control in your VBA project.

Bernie


"c1802362" <utay1@cox.net> wrote in message 
news:1734d8ff-e752-46a0-ba78-483a22042e0f@v25g2000yqk.googlegroups.com...
On Nov 16, 10:56 am, "Bernie Deitrick" <deitbe @ consumer dot org>
wrote:
> Art,
>
> This works for me:
>
> Private Sub Calendar1_Click()
> Dim myCal As Calendar
> Set myCal = Calendar1
> MsgBox myCal.Value
> End Sub
>
> HTH,
> Bernie
> MS Excel MVP
>
> "c1802362" <c1802...@cox.net> wrote in message
>
> news:78012296-7c10-4576-8b14-f38f3272c0f6@f20g2000vbl.googlegroups.com...
>
>
>
> > running Excel 2003 (going to 2007 in the next few months)
>
> > I have inserted a pop-up calendar (Insert/Object.../Calendar Control
> > 11.0). No problems getting it to do what I want - except when I
> > declare my variables (Option Explicit).
>
> > I can't seem to determine what type the Calendar object is - Dim
> > Calendar as Object returns a "Block Not Set" error.
>
> > Any sugegstions?
>
> > Art

I'll try this, but when I started typing my Dim statement (Dim
Calendar1 As ....) I couldn't get an object description with Calender
in it

(Which is why I asked the question in the first place - thanks!) 

0
Bernie
11/17/2009 1:31:16 AM
Reply:

Similar Artilces:

xsl:with-param fails in XSL that accepts arguments from XML control
Hi, why does with-param fail to send parameters to any templates in a stylesheet that also accepts arguments from the ASP.NET XML control? The argument from the XML control seems to be available to any template in the stylesheet, even if a parameter for the argument is NOT coded for a template call. On the other hand, any parameters coded for a template call don't seem to pass their values (the stylesheet doesn't crash - everything is still rendered). ASP.NET C# code that loads the xml control xmlCtrl.TransformSource="template.xsl"; XsltArgumentList args1 = new XsltArgum...

Cross Org Calendar sharing?
We are in the process of merging two Exchange 2003 organizations. Currently we are just using forwarding contacts for GAL population and mailflow. What are our options for sharing free/busy calendar information before actually migrating AD and mailboxes? Regards, Paul I have done this exact thing with this tool. Worked perfectly. http://www.microsoft.com/downloads/details.aspx?FamilyId=E7A951D7-1559-4F8F-B400-488B0C52430E&displaylang=en#overview <pfortner@gmail.com> wrote in message news:1127753794.001623.107160@g44g2000cwa.googlegroups.com... > We are in the process of merg...

Calendar Entry, invite one person everyone gets invited.
Hi All I have an issue with a client of ours, Where if they invite a particular single user to a calendar entry as an attendee the invite is sent out to all staff. They are running SBS 2003 Premium with ISA 2000 (not sp1) Check how delegation of the particular user calendar was made: in Outlook: tools > options > delegates and uncheck "Delegate receives copies of meeting-related messages sent to me". Xavier "Fisheye" <support@fisheye.nospam.co.nz> wrote in message news:ekECrO6SGHA.4452@TK2MSFTNGP12.phx.gbl... > Hi All > > I have an issue with...

Compiler error dependent name is not a type prefix with 'typename' to indicate a type
I'm getting a compile error on vs2005 that I dont understand. The help explains that this is a breaking change for VC++.NET 2005 compiler, made in order to conform to the ISO C++ standard, and I've tried it using evc+ + 4.0 sp4 and it compiles ok. Code is as follows............. //paramstring.h template <class T> class ParameterStringAW { public: typedef T* PT; typedef const T* PCT; class CKeyValuePair { protected: TString m_strKey; TString m_strValue; BOOL m_bIgnoreCase; public: CKeyValuePair(PCT szKey, PCT szValue, BOOL bIgnoreCase) : m_strKey(szKey), ...

Changing the default color of text in a static control
I am using a static control to give the status of for inputs of the parallel port. How can I change the black text of this control to another color. slip wrote: > I am using a static control to give the status of for inputs of the parallel > port. How can I change the black text of this control to another color. You add a message handler for WM_CTLCOLOR to the parent dialog window. See the example in the documentation for OnCtlColor. -- Scott McPhillips [VC++ MVP] Hey slip, the way that I change the colors is thus (the name of my static text control is IDC_ID1) add OnCtlCo...

Field type question
Can you use a check box instead of a radio button? ...

synching Entourage calendar
I am trying to synch my calendar with tungle.com and my new blackberry and it is only synching some recurring events in both cases which leads me to believe that the problem is on the entourage side. On 2010-02-21 21:44:16 -0500, anna said: > I am trying to synch my calendar with tungle.com and my new blackberry > and it is only synching some recurring events in both cases which > leads me to believe that the problem is on the entourage side. How do you sync with tungle.com?? Are you using SyncServices and then some sort of application? Are you exporting to a file? In a...

Exchange calendar update tool; msextmzcfg nonexistent users
Hi all, I already ran the setup msextmzcfg successfully, but have not run the batch yet. I have like half of my user mailboxes logged in the Mailboxes_1.txt and the other half in the NonExistent.txt. If i run the batch, it will only fix those in mailboxes_1.txt as i know. How do i fix those in nonexistent.txt and how come i have active users in the nonexistent.txt recorded as not have Time Zone Information. Any idea? Thanks for your time. I ran into the same scenario...all you need to do is copy and paste the valid users from nonexistent.txt into mailboxes_1.txt and append the appr...

Returning a reference to a control in a form to a query
This is my situation: I have a form that I might use in more than one place, so I don't want to use a fully qualified reference to a control on it within queries on the form. Also, it is fairly deep in the structure and I've never found referencing a control on a deeply nested subform intuitive. So what I want to do is have a function that simply returns something like Me.Control1.Value. The problem is, if I put that function on the form's module where it will know about "Me", it isn't recognized by the query. What's the best way to handle this? Thanks...

Viewing multiple calendars in Outlook 2003
How do I create the option of viewing other calendars while viewing my own. The other calendars I prefer to view are public in the firm. Here are the steps to be able to view other people's calendars while viewing your own in Outlook 2003: 1. Open Outlook. 2. Select View from the menu bar and make sure Navigation Pane has a check mark next to it, if it doesnt then select it. 3. Now Select Go from the menu bar and Select Calendar. 4. Near the bottom left side of the calendar window you should see "Open a Shared Calendar......" Click on it. 5. Now enter the first and last na...

Create a day per view calendar
Is it possible to create a calendar with a day to view? I want to make something that'll fit the general day view flip type desktop calendar with my own pics etc. I can't seem to get the calendar date range to be anything other than months for a start and then I'll need to get two or three of each day on a page (to save printing costs). -- Sue ...

WSDL complex type generation.
does anyone know if wsdl.exe actually uses xsd.exe to generate the wsdl contract file ? Iam looking for ways to control schema generation of my custom classes, so they take into account the public properties of the base classes any help would be appreciated. regards -a ...

Automatically control the font of a cell when a function is used
I have a my custom function say myfun(arguments) I would like that whenever I use this function in any cell of a workbook (sheet) there should be always be the same font lets say Times New Roman, the font size to be 10, font color automatic. I tried to make another sub that will check every time the sub is entered and ensure that the cell is well with the desired font type. But, I could not get through the sub. Any help in this regard will be appreciated. Thanks in advance. I don't think that you can make changes to the worksheet from within the UDF but you could use a Workshe...

What is X500 Email-type ?
I have Exchange 2000 SP3 running Windows 2000 SP4 and using Outlook 2003. Can you someone please tell me what Email Address type of X500 is used for? When in Active Directory, I go to the E-mail Addresses tab of a user and I see that entry along with other aliases. Please Advise. Thank you!! DM X500 is a proxy email address that is created when a mailbox is moved using the Exchange Migration wizard (ie. Mailboxes moved from one organization to another). This address points to the DN of the mailbox in its former organization. This allows for people to reply to messages sent by that user p...

Archiving the Outlook 2003 Calendar
My archive utility seems to be only working sporadically. When I attempt to archive my calendar, sometimes it works and I get a .pst file that is 2,000 kb (+). At other times it creates a .pst file that is only 265 kb in size and contains on data. Is there anything I can do to alleviate this? I'm asking that it archive items older than the current date (but I've also tried archiving items older than yesterday and had similar results). Sometimes it works fine, sometimes it doesn't. Any suggestions will be appreciated. ...

How do you add a drop down calendar to a form field?
Is this possible? Do you mean the "Class" MSCAL.Calendar.7...the Calendar Control? "kjv77" wrote: > Is this possible? What version of Access are you using? I believe that this is built into Access 2007. HTH "kjv77" wrote: > Is this possible? It is. Date Picker in the Form Properties Format Tab "roccogrand" wrote: > What version of Access are you using? I believe that this is built into > Access 2007. > > HTH > > "kjv77" wrote: > > > Is this possible? There's VB, C, and J code to do this...

Shared Calendar Problem
Hi, one question: in my company the users have shared them Calendar to everyone makes change. One user send a schedule invite and receive the answer, everybody receives too. It is a Exchange problem? Thanks. P.S. Exchange SP2 ...

Dynamically control how many lines on a graph?
I apologize if this is a FAQ, for some reason my newsreader isn't picking up any messages from this group (looks like no postings) so hopefully I'll be able to access responses, if not, I'll googlesearch for responses later today and tomorrow... ------------------------------------------------ I have many sets of data, all on the same sheet (in a repeated pattern- starting in row 1, then 11, then 21, etc) My single graph is based on named ranges, and the named range(s) are based on Steve Bullen's funchart1 (autoexpanding chart) to control how many x-axis values are shown- whic...

Tooltips don't appear in Crystal Report Control in VC6/7
Could someone kindly tell me how I can view tooltips created in Crystal Reports 8.5 using a Crystal Report Control (NOT the Crystal Report Viewer Control) ActiveX Object in VC++. Currently I am able to view the crystal reports using the Crystal Report Control from a Dialog based VC++ application, but I have been unsuccessful in making the tooltips appear (even though the tooltips appear fine when opening the report using the crystal report software) Any help will be greatly appreciated. Thanks in advance. CD ...

Delegate can print calendar
Can a Delegate print a my Calendar, if so where do I make the setting to allow it to happen. ...

Use over a network/community calendar/address book
I've been using MSoffice on my personal computer for some time. I would like to use it at my business (6 computers). Can I load MSoffice on the server and additional copies on each computer and set up the program so that we have a community calendar, address book, notes, tasks and projects? If so, is there any special hardware need? I have a server running now. Is it just a matter of loading new software on each computer and selecting "sharing"? There doesn't seem to be an option for that with calendar/notes/tasks/address book. Hi Jim: The short answer is "No" yo...

Calendar continues sending appointment messages to the Deleted Items folder
Hi, I have a user who reports her Calendar (Outlook 2000) continues sending appointment messages to the Deleted Items folder. Server is Exchange 5.5 SP4 server. Any thoughts? Do they get added to the calendar before they are deleted? Does this person have the Resource Scheduling option under Tools->Options->Caledar set to automatically accept? Also, does the person have the option set to delete blank and voting options turned on? One last thing to check, does the user have any rules defined that affect appointment items? --� Milly Staples [MVP - Outlook] Post all replies to...

OCX Control not getting localized!
Hi All, I have a problem with localization(internationalization)! Our Methood of localization: --------------------------- We are using .rc file and string table for localization! As well as using DB(SQL) Tables for localization(it is done by our own toolkit). The later one is data driven and localization happening at RunTime. 1.Installing Translators 2.Localizing DB 3.Changing System Locale(via Advanced Tab) are the steps The Problem: ----------- One propertypage which is using Non-MFC Control is not at getting localized. The control existing at this page is not u...

Common Calendar inaccessible
I had a major network lock up and since then the calendar free/busy hasn't worked. I've searched the net and can't resolve the issue. Would it be possible to provide additional information? Configuration, the role of your system, whether you can ping it, access it, location of the calendar, how you access it, errors in the event logs, etc. You may want to give one of the links a look-see as they are very informative. Microsoft cleaned up the 555375 article due to the RTFM references. http://www.petri.co.il/how_to_ask_a_question.htm http://support.microsoft.com/kb/555375 -- ...

Outlook calendar 2 issues.
Hi all, I am using Outlook 2003 and in the calendar view I would like to know: 1). is it possible to view the time bar (like down left hand side) also on the right hand side? and also..... 2). can I see the time show in the subject bar. i.e. If I make an appointment at 11:15 it says 11:15 when I am viewing in the 5 day week view but if I choose 11:30 start time it doesn't show in the subject bar. Thanks Martin #1 - No. #2 - times display only if the start or end time is out of scale. See http://www.outlook-tips.net/archives/2009/2...