LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 550
Default Problem with Excel 2002

Doc,

Why the Activate method? The Select method works fine.

You didn't mention before that "Select" worked??
There shouldn't be much of a difference (obviously, for your
workbook, there is though).

Are there any libraries I could be missing?

Probably not. If they don't show up as "Missing" on the References
list, Excel didn't try to use one and not find it.

Would reinstalling Excel or Office XP Pro help?

Again, probably not.

I don't have 2002 or XP at home (I do in the office).
If you could forward me the file directly, I'll take a look at it
tomorrow.

John



"Doc" wrote in message
...
John,

I made both changes and there were no changes.

Why the Activate method? The Select method works fine.
Are there any libraries I could be missing? Why I would
be missing them I don't know. Would reinstalling Excel
or Office XP Pro help?

Thanks for the assistance.

Doc
-----Original Message-----
Doc,

It still could be a library reference compatibility

issue.
Try fully qualifying the textbox/commmandbutton

references.

e.g.
If Not DateFlag Then ActiveSheet.OLEObjects

("DateOfSurgery").Activate
ActiveSheet.OLEObjects("SaveData").Activate

John

"Doc" wrote in

message
...
The word "Missing" is NOT present in front of any

checked
reference.

This is exactly what happens. The Excel file is

open. I
click on a Command Button and when it runs the VBA code
an error window pops-up with the following:

Runtime error 1004
Activate method of OLEObject Class failed

I choose Debug and the VBA editor opens with
ActiveSheet.DateOfSurgery.Activate highlighted in the
following line of code.

If Not DateFlag Then ActiveSheet.DateOfSurgery.Activate

DateOfSurgery is a textbox on the ActiveSheet.

The same thing happens when the following code is
executed:

ActiveSheet.SaveData.Activate

SaveData is a CommandButton on the ActiveSheet.

Doc




-----Original Message-----
John,

I appreciate the prompt reply.

I opened Tools/References. A window opens with a list
of
at least several hundred references. The only checked
ones are the first five and they are (in order):
Visual Basic for Applications
Microsoft Excel 10.0 Object Library
OLE Automation
Microsoft Office 10.0 Object Library
Microsoft Forms 2.0 Object Library

Without knowing what is supposed to be available, I
don't
know if any are missing? Are they ALL supposed to be
checked???

Thanks again.

Doc
-----Original Message-----
Doc,

Open up the VBA editor and check Tools/References.
Do any show up as "Missing"??

John

"Doc" wrote in
message
...
I created an Excel file with Excel 2000. The file
contains Textboxes and CommandButtons. The VB code
associated with the controls ran fine.

I brought the file home to modify on a computer

that
is
running Excel 2002 and the following error arises.

It appears VB is not recognizing the Activate

method
for
the textboxes or commandbuttons. When it encounters
the
code, ActiveSheet.TextBoxName.Activate or
ActiveSheet.CommandButtonName.Activate
I receive the error: Runtime error 1004
Activate method of OLEObject Class failed

Any suggestions?

Thanks.


.

.



.



 
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
Excel 2002/2003 problem Palpha32 Excel Discussion (Misc queries) 0 March 23rd 09 03:18 AM
Excel 2002 Installation Problem Philip Gabe Setting up and Configuration of Excel 2 December 1st 07 01:34 AM
excel 2002 formatting problem [email protected] Excel Discussion (Misc queries) 1 April 25th 07 03:26 AM
Iteration problem (Excel 2002) Stefan Kasserra Excel Worksheet Functions 1 July 17th 06 11:38 PM
problem in excel 2002 and windows xp aries58 Excel Programming 6 November 26th 03 04:43 AM


All times are GMT +1. The time now is 11:57 PM.

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

About Us

"It's about Microsoft Excel"