PDA

View Full Version : [SOLVED] Where to get Activex calendar control?



JeffT
03-23-2005, 03:28 PM
Hi

Finally finished my project & having e-mailed it to a couple of friends, had my laptop stolen. Now I've got another laptop and had the project e-mailed back the calendar control doesn't work. I've got Excel Access Word etc but it doesn't appear in the controls box or in the "additional controls" list in VB. Possibly some IT thing, they don't like Macros. Where can I get it from and where would I put (Install?) it.

The link on the MS website goes to "page not found" and in a search here and on the web I can't find anything except a lot of advise about what to do if it goes wrong.

Yor help would be appreciated.

Regards

Jeff T

Zack Barresse
03-23-2005, 03:31 PM
Hi Jeff,

I think this has to do with an incomplete installation. You may need to reinstall Excel (and choose Complete). Although I could be wrong (tough calling on the memory :confused2 ).

Ken Puls
03-23-2005, 03:44 PM
Jeff, what version of office are you running?

**Update for you**

In Office 2003, it is stored in c:\Program Files\Microsoft Office\MSCAL.OCX

It does require registration with windows. Use regsvr32.exe, but I can't remember the exact syntax for it.

Zack Barresse
03-23-2005, 03:46 PM
regsvr32.exe [path\file.dll]

JeffT
03-23-2005, 04:06 PM
On my home machine where I've tjust tried it as well its Office 2003 but I only have Word Excel & PPoint installed. At work I think its 2000 or 2002 which is what I wrote it on

I've just tried checking the install on excel on this machine (I only loaded it last night) and it seems to have fully installed. I read somewhere today that Calendar control is in access is that correct? or is it in Excel as wel.

Jeff

Kpuls

I don't have that tree structure I'm running xp as of last saturday. I get C:\Program files\Microsoft Office\ then Media or OFFICE 11 or Power Point viewer or templates.

firefly

Ihave regsvr32.exe but don't know what to do with it! If I click it it gives me a load of options like \i or others (old dos keys i think). I now have a regsvr prefetch file as well whatever that may be!


Jeff

Zack Barresse
03-23-2005, 04:10 PM
No, leave Windows prefetch files alone. Regsvr32 is for registering dll files, that's it. You need the file first. It should come with the complete installation (why I suggested a possible reinstall).

Ken Puls
03-23-2005, 04:20 PM
Sorry, Jeff.

The file should be in C:\Program Files\Microsoft Office\OFFICE11\MSCAL.OCX

It's the OCX file that you'd want to register (I believe). MSCAL changed from a dll to an OCX with Office 2000.. I think...

Zack, does that sound right to you?

Oh, and the Calendar control is an Office control, not specific to any one of the Office programs.

JeffT
03-23-2005, 04:27 PM
I'll try an uninstall / reinstall tommorow though It was a complete install yesterday on a new computer so can't see why it would go wrong. And why is it not on the versions of excel at work either. Access was loaded remotely so that might not have all the bits installed. I think when I was using 97 I had to load it seperately. I'm sure I got it from the link on the MS website, version 8 I think it was, that was a long time ago and now the link has gone.

Off to bed now try again tommorow.

Thanks

Jeff

Kpuls

It's not there, the only *.ocx files are in the HTML folder

HTMLMARQ.OCX & HTMLMM.OCX

Now I Must go to bed


Jeff

Zack Barresse
03-23-2005, 04:34 PM
Ken: I thought there was also a dll that went along with it (2 files), but I could be mistaken. I also thought there was an attachment on this board some time ago with these library files.. :dunno

Ken Puls
03-23-2005, 04:46 PM
Hmmm...

I took a screen shot of all the MSCAL files on my PC, and included the general info from the help. There are mutiple files, but no dll. Help files only refer to the OCX as well. I was under the impression that the ActiveX control was in the OCX format and that was all that needed registering, but could be wrong.

Paleo
03-23-2005, 05:07 PM
Hi Ken,

what does that CMA at your signature means?

P.S.: Sorry for the off topic question...:o:

Ken Puls
03-23-2005, 08:54 PM
Hi Carlos,

I'm an accountant (http://www.cmabc.com/home/index.html), as well as an Excel geek! ;)

Paleo
03-23-2005, 09:09 PM
Hi Ken,

great, me too CRC-RS (http://www.crcrs.org.br) and I participate of the accountants technology comission board (http://www.crcrs.org.br/comissoes/comptecnologia.htm) also.

Nice to know that colleague!

Ken Puls
03-23-2005, 10:28 PM
Well hey, there you go! I didn't know that! :thumb

Jeff! Returning the thread back to you, DRJ had attached the Calendar Control in a zip file on this post (http://www.vbaexpress.com/forum/showthread.php?t=1128&highlight=calendar+control)

Try following his instructions on it. You may not need to register it after all...

HTH!

JeffT
03-24-2005, 01:29 PM
Kpuls

Thanks for the link. I tried a search before I asked but didn't find that. I've copied the mscal.opx into

c:\Windows\system32

then in VBE used

Tools\References with Visual Basic For Applications highlighted (though it doesn't seem to matter which one is) click Browse, search for mscal.opx in the add reference dialog box which comes up and click open then OK in the References box.

It then appears in the Additional controls Box as Calendar Control 10.

I've had to re draw the calendar in the file as it'd dissapeared. (I tried reopening the zip file which I e-mailed it to myself with and it had disappeared from here as well, though I may have saved it after opening can't remember. It must move with the file as I've e-mailed it before.)

Is their any way to get a dialog box to come up if the activex calender control isn't there. I presume I can use On Error Goto ..... though what if this isn't the error?

Also is there a way of automating the instalation of Activex controls so I could send them as well in case. This probably involves more prtogramming knowledge than I have.

Well thanks again everybody. With all the various comments I've managed to get it going again. I'll e-mail the control to work and set up my machine there as well. Sorry for the long description of my steps but I thought I'd store it here as well as putting it in my help file.

Regards

Jeff T

Ken Puls
03-24-2005, 01:51 PM
Hi Jeff,

A couple of things...

First, it's an *.ocx, isnt' it? Mine is, so I'm hoping you just typo'd. Second, the default location for the file is C:\Program Files\Microsoft Office\OFFICE11\MSCAL.OCX

I would put it there, not in the Windows\System32 folder. Reason is that when you set the reference, it should reference a path that is consistent on the other machines you send it to.

As far as the On error thing, no specifics yet, but you may want to check out these two articles. Something could be adapated from one of them to give a messagebox if the reference can't be added. If you are expecting this to be an issue, however, I would generally recommend to remove the reference before you close the file, then add it at opening. It's easier to remove an existing reference than a missing one, particularly if it's not referenced correctly.

Add a VBA Reference Library via code (http://www.vbaexpress.com/kb/getarticle.php?kb_id=267)
Remove Missing VBA Library References via code (http://www.vbaexpress.com/kb/getarticle.php?kb_id=272)

HTH,

JeffT
03-24-2005, 03:29 PM
Kpuls



Yes just a typo. *.ocx it was. With regard to where I put it I did a search for *.ocx and most were in ...\system 32. There were only two others under Office 11 and they were in the \ HTML branch. Others under prog Files were in \Intervideo or \ HP or \ Canon etc. I thought safety in numbers.

If the path needs to be the same on other machines how do we know where the .ocx will be located? I presume if I move it I'll have to re reference it. I'll take a look at one of the other computors at work and see where it is on them then put it there.

I di read somewhere about another calendar control in excel which didn't need the activex control but I guess that wouldn't work in a dialog box.

Regards

Jeff T

Ken Puls
03-24-2005, 03:42 PM
Hi Jeff,

Yeah, I've got over 150 *.ocx files on my machine. The only 3 in the office folders are the 2 HTML ones your referenced, and the MSCal one in the location I gave you above. Mine are scattered trhoughout my PC though, in many different locations.

The path I gave you is the default install path, which is why I'd use it. If you set a reference using a different path, you may (I haven't tested this) run into issues when you move to another machine. I just think it's safer overall.

Having said that, I could be wrong!

I vaguely remember something about a different calendar control as well, but the what, where, when, who and all that escape me right now. :)

Good luck!