Home |
Search |
Today's Posts |
#9
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2002/2003 problem | Excel Discussion (Misc queries) | |||
Excel 2002 Installation Problem | Setting up and Configuration of Excel | |||
excel 2002 formatting problem | Excel Discussion (Misc queries) | |||
Iteration problem (Excel 2002) | Excel Worksheet Functions | |||
problem in excel 2002 and windows xp | Excel Programming |