Wrox Programmer Forums
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 17th, 2005, 01:07 PM
Authorized User
 
Join Date: Sep 2004
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default can't find an object

Hi -

I have created this macro consisted of several forms for user entry and a module for processing the data entry, and a calendar control to display calendar to user to select a date.

We are testing this macro as users. However, several of us located at Belgium office came into an error when open this excel file. The error message says "Can not load this object because it is not available in this machine". I did not do any set up changes for users over here in the US. So I am wondering if this has anything to do with the setup in general? And how should I overcome the problems so that users overseas can use this macro too?

Do I need to ensure the calendar control is installed on each machine? but I did not modify any setup for users over here?

Kathy
 
Old February 18th, 2005, 09:03 AM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 180
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am assuming the Calendar control being used is the calendar Control 9.0.
If so then in the VBA editor go to Tools...Additional Controls... and place a check mark next to the above item.

This should resolve the issues in the future. It may need to be repeated for each PC to be used.

Matthew

 
Old February 23rd, 2005, 06:12 PM
Authorized User
 
Join Date: Sep 2004
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Matthew -

It is Calendar control 9.0, I was referring to. However, my users oversea (at Belgium) don't even see it as an option to choose from VBE-> Tools->References. Wondering if this has an Excel application installation related issue?

What also puzzles me is that I didn't turn on the calendar control for the users here (in US) and the macro is running fine with their pc.

I was trying to avoid date conversion headache by using the calendar control so that the users can click on the pop-up calendar instead of typing it. Wondering if there is other way of handling this if I still cannot figure out how to turn on calendar control?

Kathy
 
Old February 23rd, 2005, 08:06 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 150
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ask your Belgium colleagues to look for a calender control in their native language. It probably doesn't have the english name.
 
Old February 24th, 2005, 03:03 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 150
Thanks: 0
Thanked 0 Times in 0 Posts
Default

What I mean is, ask them to look in the Control Toolbox from the Excel View menu. From the extended objects they can select in the bottom item of the Toolbox menu (More controls...), they should be able to find a localized name for the Calendar control.

If they're running the macro recorder they should also get the vba code name for the control, which I believe should be the same as yours. But you'd then know if it's accessible at all.

When I look in the VBE References i'm not able to find the Microsoft Calendar Control, unless I have placed a Calendar control in a sheet (MSCAL.OCX).
 
Old February 24th, 2005, 03:58 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 150
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Maybe you can get around the problem by adding the reference to the control before you reference it in your code.

Application.VBE.ActiveVBProject.References.AddFrom File "C:\Windows\system32\MSCAL.OCX"
 
Old March 4th, 2005, 06:04 PM
Authorized User
 
Join Date: Feb 2005
Posts: 85
Thanks: 0
Thanked 0 Times in 0 Posts
Default

does everyone have the same excel version?
 
Old March 4th, 2005, 06:21 PM
Authorized User
 
Join Date: Sep 2004
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default

We had the problem solved as described below. Origionally, we didn't even see calendar control as an option to select in VBA-Editor-Reference-Add controls. In order to have the selection option, the helpdesk loaded the calendar control by doing the following.

Go to start - run and type cmd
Type commando cd\winnt\system32 and enter
Type commando in regsvr32 mscal.ocx and enter

Open Excel and go to Tools - Macro - Visual Basic Editor
Go to Microrsoft Visual Basic and Tools - References
Browse to C:\WINNT\SYSTEM32 and look for mscal.ocx (ensure that under Files Type "ocx" is selected).
Clinck Open and it should appear under the references listed now.

Kathy





Similar Threads
Thread Thread Starter Forum Replies Last Post
Combo Box can't find Object message PaulJH Access 5 April 13th, 2007 03:27 PM
How to Find databaseName of particular object? ramk_1978 SQL Server 2000 3 May 29th, 2006 09:08 AM
cannot resolve object, cannot find java file!!help Calverstine Apache Tomcat 3 May 22nd, 2006 03:02 PM
Open Word Doc from Access - find, find next save donaldmaloney Access VBA 1 May 25th, 2005 11:09 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.