Chip Pearson's VB Object references

I recently distributed a 2007 workbook that contained pop up calendars 
courtesy of the Microsoft Office Calendar Control 2007. I foolishly assumed 
that when a user opened the workbook, Excel would “realise” that there was a 
Calendar control embedded and automatically enable the VB reference.  
Optimistic eh?
I was looking at ways to automate the enablement of the Calendar reference 
object – I found this code on Chip Pearson’s site and wondered if a similar 
thing could be run to automatically select the Calendar control?  This code 
enables the Microsoft Visual Basic Application Extensibility 5.3 object 
library.

        ThisWorkbook.VBProject.References.AddFromGuid _
        GUID:="{0002E157-0000-0000-C000-000000000046}", _
        Major:=5, Minor:=3

All help appreciated!
Kind regards,
Robert


Rodels!  Creating weapons of Maths Destruction since 2003.
0
Utf
3/22/2010 8:28:01 AM
excel.programming 6508 articles. 2 followers. Follow

6 Replies
987 Views

Similar Articles

[PageSpeed] 2

Surely, if you created the workbook in  2007, and your other users also have 
2007, it will already be referenced (did you check the References list?). 
More probable is that they don't have the control on their machine.

-- 

HTH

Bob

"Rodels" <rodelsSPAMSPAM@BLOODYSPAMbtinternet.com> wrote in message 
news:4E17169A-F7FD-428D-852D-1BB98E2F5756@microsoft.com...
>I recently distributed a 2007 workbook that contained pop up calendars
> courtesy of the Microsoft Office Calendar Control 2007. I foolishly 
> assumed
> that when a user opened the workbook, Excel would "realise" that there was 
> a
> Calendar control embedded and automatically enable the VB reference.
> Optimistic eh?
> I was looking at ways to automate the enablement of the Calendar reference
> object - I found this code on Chip Pearson's site and wondered if a 
> similar
> thing could be run to automatically select the Calendar control?  This 
> code
> enables the Microsoft Visual Basic Application Extensibility 5.3 object
> library.
>
>        ThisWorkbook.VBProject.References.AddFromGuid _
>        GUID:="{0002E157-0000-0000-C000-000000000046}", _
>        Major:=5, Minor:=3
>
> All help appreciated!
> Kind regards,
> Robert
>
>
> Rodels!  Creating weapons of Maths Destruction since 2003. 


0
Bob
3/22/2010 9:55:58 AM
Hi Rodels,

> I recently distributed a 2007 workbook that contained pop up calendars 
> courtesy of the Microsoft Office Calendar Control 2007. I foolishly assumed 
> that when a user opened the workbook, Excel would �realise� that there was a 
> Calendar control embedded and automatically enable the VB reference.  
> Optimistic eh?

Problem is, there is NO control embedded in your file, only a reference to the 
control on your system.

If the user does not have that control installed, there is no way to have VBA 
register the control, simply because it isn't there in the first place.

You need to instruct your user how to download and install the mscal.ocx 
control (available through the Microsoft website).

Regards,

Jan Karel Pieterse
Excel MVP
http://www.jkp-ads.com

0
Jan
3/22/2010 10:09:11 AM
Bob and Jan Karel,
many thanks.

Bob you are correct - the reason the control would not activate is that the 
control was not available.  Jan Karel's suggestion of downloading the ocx and 
installing that worked.  I suspect that environments with locked down secure 
desktops could pose a problem to this approach so I will need to rethink.

Many thanks again!

Robert
-- 
Kind regards,
Robert


Rodels!  Creating weapons of Maths Destruction since 2003.


"Rodels" wrote:

> I recently distributed a 2007 workbook that contained pop up calendars 
> courtesy of the Microsoft Office Calendar Control 2007. I foolishly assumed 
> that when a user opened the workbook, Excel would “realise” that there was a 
> Calendar control embedded and automatically enable the VB reference.  
> Optimistic eh?
> I was looking at ways to automate the enablement of the Calendar reference 
> object – I found this code on Chip Pearson’s site and wondered if a similar 
> thing could be run to automatically select the Calendar control?  This code 
> enables the Microsoft Visual Basic Application Extensibility 5.3 object 
> library.
> 
>         ThisWorkbook.VBProject.References.AddFromGuid _
>         GUID:="{0002E157-0000-0000-C000-000000000046}", _
>         Major:=5, Minor:=3
> 
> All help appreciated!
> Kind regards,
> Robert
> 
> 
> Rodels!  Creating weapons of Maths Destruction since 2003.
0
Utf
3/22/2010 11:32:01 AM
That is always a problem, that is why many developers develop their own 
calendars.

-- 

HTH

Bob

"Rodels" <rodelsSPAMSPAM@BLOODYSPAMbtinternet.com> wrote in message 
news:8BEA7B16-E63D-4381-A519-0063E15132E7@microsoft.com...
> Bob and Jan Karel,
> many thanks.
>
> Bob you are correct - the reason the control would not activate is that 
> the
> control was not available.  Jan Karel's suggestion of downloading the ocx 
> and
> installing that worked.  I suspect that environments with locked down 
> secure
> desktops could pose a problem to this approach so I will need to rethink.
>
> Many thanks again!
>
> Robert
> -- 
> Kind regards,
> Robert
>
>
> Rodels!  Creating weapons of Maths Destruction since 2003.
>
>
> "Rodels" wrote:
>
>> I recently distributed a 2007 workbook that contained pop up calendars
>> courtesy of the Microsoft Office Calendar Control 2007. I foolishly 
>> assumed
>> that when a user opened the workbook, Excel would "realise" that there 
>> was a
>> Calendar control embedded and automatically enable the VB reference.
>> Optimistic eh?
>> I was looking at ways to automate the enablement of the Calendar 
>> reference
>> object - I found this code on Chip Pearson's site and wondered if a 
>> similar
>> thing could be run to automatically select the Calendar control?  This 
>> code
>> enables the Microsoft Visual Basic Application Extensibility 5.3 object
>> library.
>>
>>         ThisWorkbook.VBProject.References.AddFromGuid _
>>         GUID:="{0002E157-0000-0000-C000-000000000046}", _
>>         Major:=5, Minor:=3
>>
>> All help appreciated!
>> Kind regards,
>> Robert
>>
>>
>> Rodels!  Creating weapons of Maths Destruction since 2003. 


0
Bob
3/22/2010 2:34:08 PM
Interesting point.

By the way, I enjoyed your sessions at the Excel User group last year.
-- 
Kind regards,
Robert


Rodels!  Creating weapons of Maths Destruction since 2003.


"Bob Phillips" wrote:

> That is always a problem, that is why many developers develop their own 
> calendars.
> 
> -- 
> 
> HTH
> 
> Bob
> 
> "Rodels" <rodelsSPAMSPAM@BLOODYSPAMbtinternet.com> wrote in message 
> news:8BEA7B16-E63D-4381-A519-0063E15132E7@microsoft.com...
> > Bob and Jan Karel,
> > many thanks.
> >
> > Bob you are correct - the reason the control would not activate is that 
> > the
> > control was not available.  Jan Karel's suggestion of downloading the ocx 
> > and
> > installing that worked.  I suspect that environments with locked down 
> > secure
> > desktops could pose a problem to this approach so I will need to rethink.
> >
> > Many thanks again!
> >
> > Robert
> > -- 
> > Kind regards,
> > Robert
> >
> >
> > Rodels!  Creating weapons of Maths Destruction since 2003.
> >
> >
> > "Rodels" wrote:
> >
> >> I recently distributed a 2007 workbook that contained pop up calendars
> >> courtesy of the Microsoft Office Calendar Control 2007. I foolishly 
> >> assumed
> >> that when a user opened the workbook, Excel would "realise" that there 
> >> was a
> >> Calendar control embedded and automatically enable the VB reference.
> >> Optimistic eh?
> >> I was looking at ways to automate the enablement of the Calendar 
> >> reference
> >> object - I found this code on Chip Pearson's site and wondered if a 
> >> similar
> >> thing could be run to automatically select the Calendar control?  This 
> >> code
> >> enables the Microsoft Visual Basic Application Extensibility 5.3 object
> >> library.
> >>
> >>         ThisWorkbook.VBProject.References.AddFromGuid _
> >>         GUID:="{0002E157-0000-0000-C000-000000000046}", _
> >>         Major:=5, Minor:=3
> >>
> >> All help appreciated!
> >> Kind regards,
> >> Robert
> >>
> >>
> >> Rodels!  Creating weapons of Maths Destruction since 2003. 
> 
> 
> .
> 
0
Utf
3/22/2010 5:04:01 PM
Thank-you, I am sorry there are none planned for this year, but they take a 
lot of organising.

-- 

HTH

Bob

"Rodels" <rodelsSPAMSPAM@BLOODYSPAMbtinternet.com> wrote in message 
news:1148E7C5-24E2-4889-8259-07C370456DF6@microsoft.com...
> Interesting point.
>
> By the way, I enjoyed your sessions at the Excel User group last year.
> -- 
> Kind regards,
> Robert
>
>
> Rodels!  Creating weapons of Maths Destruction since 2003.
>
>
> "Bob Phillips" wrote:
>
>> That is always a problem, that is why many developers develop their own
>> calendars.
>>
>> -- 
>>
>> HTH
>>
>> Bob
>>
>> "Rodels" <rodelsSPAMSPAM@BLOODYSPAMbtinternet.com> wrote in message
>> news:8BEA7B16-E63D-4381-A519-0063E15132E7@microsoft.com...
>> > Bob and Jan Karel,
>> > many thanks.
>> >
>> > Bob you are correct - the reason the control would not activate is that
>> > the
>> > control was not available.  Jan Karel's suggestion of downloading the 
>> > ocx
>> > and
>> > installing that worked.  I suspect that environments with locked down
>> > secure
>> > desktops could pose a problem to this approach so I will need to 
>> > rethink.
>> >
>> > Many thanks again!
>> >
>> > Robert
>> > -- 
>> > Kind regards,
>> > Robert
>> >
>> >
>> > Rodels!  Creating weapons of Maths Destruction since 2003.
>> >
>> >
>> > "Rodels" wrote:
>> >
>> >> I recently distributed a 2007 workbook that contained pop up calendars
>> >> courtesy of the Microsoft Office Calendar Control 2007. I foolishly
>> >> assumed
>> >> that when a user opened the workbook, Excel would "realise" that there
>> >> was a
>> >> Calendar control embedded and automatically enable the VB reference.
>> >> Optimistic eh?
>> >> I was looking at ways to automate the enablement of the Calendar
>> >> reference
>> >> object - I found this code on Chip Pearson's site and wondered if a
>> >> similar
>> >> thing could be run to automatically select the Calendar control?  This
>> >> code
>> >> enables the Microsoft Visual Basic Application Extensibility 5.3 
>> >> object
>> >> library.
>> >>
>> >>         ThisWorkbook.VBProject.References.AddFromGuid _
>> >>         GUID:="{0002E157-0000-0000-C000-000000000046}", _
>> >>         Major:=5, Minor:=3
>> >>
>> >> All help appreciated!
>> >> Kind regards,
>> >> Robert
>> >>
>> >>
>> >> Rodels!  Creating weapons of Maths Destruction since 2003.
>>
>>
>> .
>> 


0
Bob
3/22/2010 5:10:41 PM
Reply:

Similar Artilces:

Superscripts in referenced text objects
Dear, Several days ago a question appeared in this NG on the superscripts in referenced text objects. The answers correctly recommended looking for sub-/superscript font sets. What does it mean? Optimally such a font set should contain at least all the 34 alphanumeric characters within the second 128 ANSI locations as both kinds of those scripts. Has anybody ever come across such a product? I succeeded several months ago, after the recommendation of Bernard Liengme, in adopting Chemistry fonts (“Chemistry SansSherif” and “Chemistry Sherif”). They offer unfortunately only numerals in wa...

Chart Objects Behaving Badly
Hi all. I have posted to various groups that I think are applicable, but please tell me if any of these are not. Here is my question: I have an Excel workbook with 6 sheets. Three of the sheets contain pivot tables, and the other three sheets contain bar and pie charts based on the pivot tables. Now in a Word document, I am inserting an OLE chart object ? from the menu in Word, then I check the link checkbox, so that when the spreadsheet is updated, the objects in the Word doc (in this case bar and pie charts), are also updated. When I insert the right charts into each page of the word do...

Attempt to execute com object 'mix.discount' failed. could not cre
When i open the RMS pos, it gives me this error: "Attempt to execute com object 'mix.discount' failed. could not create object.". Can anyone help??? This is a multi-part message in MIME format. ------=_NextPart_000_00D3_01C826B4.F23FB7D0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable TJW, Not positive, but it sounds like an add-on program issue. Do you have = any? Maybe a pricing add-on? --=20 Jeff=20 Check Point Software =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=...

What is the cell data reference for 5th row and 7th column called
Can someone help me with this question? I need to get the answer for my homework. Thanks for your help. I'm guessing, but might it be G5? -- Regards, RD --------------------------------------------------------------------------- Please keep all correspondence within the NewsGroup, so all may benefit ! --------------------------------------------------------------------------- "Shy-di@verizon.net" <Shy-di@verizon.net@discussions.microsoft.com> wrote in message news:A0979494-228B-435E-98F7-6BD26C900266@microsoft.com... > Can someone help me with this question? I nee...

winsock
I am trying to develop a winsock application in VB /MS Access. I have included the MS Winsock reference in VB and am able to DIM winsock objects (e.g. Sock1 dim as Winsock). However, when I try to set values (set as Sock1.remotehost) I get the error message " Object variableor with block variable not set." Can anyone help or point me in the right direction. Thank you "Dhonan" <Dhonan@discussions.microsoft.com> wrote in message news:565CF950-178C-42F3-82BE-82A4C1E51617@microsoft.com... >I am trying to develop a winsock application in VB /MS Access. I have ...

Error: object required doing Change Password in OWA
Problem: We have the Change Password feature enabled for Outlook Web Access. The button is there in OWA and it brings up the Change Password window. The domain is populated automatically. They enter their current password and type the new password twice. When they click the button to change it, it immediately shows the message "Error: object required" Reading through other, older posts on this issue...everyone seems to point to the KBB833734 as the fix. But those posts are old and we're at sp2 for Exchange 2003, which should encompass the fixes from KBB833734. Am I wrong i...

Custom Action DLL with VB?
Does anyone know if you can write a custom action DLL using VB and not C++? As far as I know they have to be written in unmanaged C++. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "Menachem Bazian" <nomail@nospam.com> wrote in message news:Xns9821D5A852C66nomailnospamcom@207.46.248.16... > Does anyone know if you can write a custom action DLL using VB and not > C++? "Ken Slovak - [M...

how to convert string to double datatype using VB.net
i want a convert a string to double datatype EggHeadCafe - Software Developer Portal of Choice JavaScript Bar Graph Control http://www.eggheadcafe.com/tutorials/aspnet/0995163b-451d-45fc-9a8f-57bba826f2a3/javascript-bar-graph-cont.aspx kadar ali schrieb: > i want a convert a string to double datatype Good question - because it shows that you switch Option Strict On (as recommended). http://msdn.microsoft.com/en-us/library/t8s7t9bf.aspx http://msdn.microsoft.com/en-us/library/hcb26cc8.aspx -- Armin "kadar ali" wrote: > i want a convert a string to...

Computer unlock causes Access VB window to appear
I am using Access 2000. I lock my computer (using Ctr+Alt+Del and selecting lock) and when I unlock my computer, Access opens the Visual Basic window when the computer is unlocked . Does anyone have any suggestions to fix this? ...

reading only the first 30 bytes of an HTML file with xml object
Hi, I wonder if there is a way to read only the first x bytes of a xml responsetext. In my project I need only first 20-30 bytes of very large HTML files and i don't want to wait for the rest to be read. Here is a piece of code i use ; Dim xml As New MSXML2.XMLHTTP xml.Open "GET", address , False xml.Send MsgBox Left(CStr(xml.responseText),25), vbInformation, "Info..." This code does the thing i want but i have to wait for all the body to be read and only after that time i can parse the text. I want to stop the process after 30. byte is read bec...

Cross References
Isit possible to create numbered tables and figures that update as new ones are inserted the way one can d this in Word: As table 1 shows, people who liked kumquats were more likely to eat out frequently than people who thought kumquats were an insurgent group in Iraq. And then the table is actually linked to the text such that if a new table is inserted it and it's text are updated. Thanks. Eric ...

Viewing the Outlook Global Address Book & Contacts from VB 6.0
Hello, I am a developer currently writing an application in *Visual Basi 6.0*. My target environment is *Citix Metaframe XP* running on *Window 2000 Terminal Server*. I am trying to instantiate the "Select Names" dialogue box one normall gets when clicking on the "To..." button when creating a new email i *Outlook 2000 SR-1* within my VB 6.0 application. Basically my Users want to have the application access the Contacts Global Address Book, etc. that they maintain in their own Outloo account (rather than maintain these email addresses in two places). I have already devel...

How can I update endnote cross-references in Word 2007 ?
I created a long document with many endnotes and some cross-references to these endnotes. When I insert a new endnote somewhere in the document, the following endnote numbers change but not the cross-reference numbers. This seems to be a bug in Word 2007 as it worked perfectly in my previous Word version. How can I update endnote cross-references in Word 2007 ? Ctrl+A, F9 should work in all versions of Word. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org "Joe56" <Joe56@discussions.microsoft.com> wro...

FS: 11 Books for $50 CHEAP
I am selling these books in a lot. I am not selling them individually. Total Number of books: 11 Total List Price Value: $476.98 Total Asking price: $50 Location: Houston, TX USA, but willing to ship via Media Mail. I take Paypal. Most of the books are in NEW or LIKE NEW condition. A small minority may have some shelfwear. There may be remainder marks. One book has a tear on the binding cover, but the binding is as tight as a drum. There is no highlighting or writing in any of the books. Please include the subject heading so that I will know which books your are interested in as I ...

"There were errors dropping ... on the designer.The XML Schema could not be interpreted from ths object."
I'm getting this error when trying to drag a table from the Server Explorer to the XSD designer. I only get the problem at home--not at work. Any ideas on how to fix this? Thanks, Chris ...

ActiveX object security in the HTML Status page
Hi all, Have a funny issue over here: I have an ActiveX object (it's a simple "WScript.Shell") in my HTML status page, for the RMS POS. I'm using it for the SendKeys possibilities... Everything works well, but each time the Cushier need to start working with the POS (and the Status page need to be loaded) we get the question/warrning from the system if we want to let the ActiveX object to be executed. I know it is silly, but each time we need to start POS we need to do this... I want to take this question/warning out. Have tryed with the properties of the Internet E...

Open CRM Object from CRM Task in SFO
Hello Group! I can create a CRM Task in SFO and set a reminder. When the time comes, the task pops up in my outlook reminder window. From there I can open the task and the task is linked to a CRM object using the regarding field (e.g. to an account). Is there anyway to open the object (account) defined in regarding directly from the task? With kind regards Kai ...

VB application crashes after QueryCencelSelectionDelete
Hi all, My developing environment: MS Win 2000 sp4 VB6 SP6 Visio 2003 standard SP2 In VB, the code for the event is as follows: Private Function vdcFlow_QueryCancelSelectionDelete(ByVal selection As Visio.IVSelection) As Boolean Dim RetVal As VbMsgBoxResult If selection.Item(1).Type = visTypeGroup Then RetVal = MsgBox("Are you sure you want to delete step " & selection.Item(1).Name & "?", vbQuestion + vbOKCancel) If RetVal = vbOK Then 'Proceed to delete the step from table Step If Not DeleteStep(Val(selectio...

A general rule for using methods that create objects
Objects created by invoking methods do not seem to behave like normal objects in VBA. Consider that in other programming languages, once you set an equality, you can use either side of the expression interchangeably. For instance: A = B C = sqrt(A) will give you the same thing as A = B C = sqrt(B) But consider two examples where this interchangeability is not true in VBA. You can say: Set Ws = DBEngine.CreateWorkspace( Arguments ) (ie, A = B) and then you can say: Workspaces.Append Ws (similar to C = sqrt(A)) but you cannot do: Workspaces.Append DBEngine.Cr...

access denied when domain admin move organizational unit objects
Good Day Urgently need asistance in solving an access denied error when moving organizational unit objects from one OU to another , our active directory is windows 2003 forest with native mode and i am memeber of the domain admin group , i checked the following KB: http://blog.joeware.net/2005/07/17/48/ and the permission are ok Thanks for support and cooperation How are you moving the OU? Are you by any chance doing it from an another system running Vista/Win2k8 with UAC in place? Have you actually checked Effective Permissions? hth Marcin "ahmedgtech" ...

.csv File to .xml File in VB.Net using 2.0 Framework and .xsd
Hey All, I've been searching for a code snippet, not a 3rd party tool, that takes a ..csv file and transforms it to an .xml file based upon an .xsd. Can anyone point me in the right direction or provide a code snippet? I would prefer vb.net but C# is fine too or even pseudo code with appropriate .Net objects and example. Thanks, TC TC, A CSV has no XSD, and there is not even a relatieon, how did you want to do this, without a XSD it is simple, http://www.vb-tips.com/dbpages.aspx?Search=csv To make it an xml file you do simple ds.WriteXML(path) Cor "TC" <getm...

VB 2010 Express
Hello, yesterday I downloaded the offline installation of VS 2010 Express and installed VB 2010 Express. I find it interesting that the splash screen shows that it is an evaluation copy. If I show the info dialog it grants me 29 days. I assume that MS relabeled the evaluation version and forgot to take out the counter. I hope that this problem will be solved in the near future. Best regards, Martin Maybe you downloaded a beta version or something ? I haven't tried to download the 2010 version yet. "Martin H." <hkshk@gmx.net> wrote in message news:hq2...

Accessing Excel pages using VB
Hi. I'm wondering if any of you can help me with a problem I'm having. It's likely a trivial answer, but I'm not seeing it at the moment. I'm using VB 6.0 and Excel 2002. I have an Excel workbook that has information about days of the month -- each day having an individual spreadsheet 'Day (1)', 'Day (2)', etc. as tabs along the bottom of the workbook. I want to be able to access information from individual "days" using a VB application and do some processing and then printing of the data in VB. First of all, when addressing data on spre...

Need to up date refereences from Ofice 2002 to 2007
I had vs2008 and Office 2000 or maybe 2002 installed. I rebuilt my system and installed Office 2007 instead. Now when I try to compile I get the errors shown below. I guess I need to add a couple of references and do see many for Office but can't identify the ones I need. I also hav a sneaking suppesion it's not that simple. Can you help get this fixes? Warning 1 The referenced component 'Microsoft.Office.Core' could not be found. Warning 2 The referenced component 'Microsoft.Office.Interop.Word' could not be found. Warning 3 The referenced...

VB.NET System.ExecutionEngineException
I am trying to run the following piece of code. Dim objCommandBars As CommandBars Dim objStandardBar As CommandBar Dim WithEvents mobjExplorer As Outlook.ExplorerClass mobjExplorer = CType(mobjOutLookApp.ActiveExplorer, Outlook.ExplorerClass) objCommandBars = mobjExplorer.CommandBars objStandardBar = objCommandBars.Item(8) <-- this statement generates an exception of the type - System.ExecutionEngineException which I am not even able to catch. But when I try to run the same statement in the immediate window it executes without any problem. Has anybody experienc...