Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I created an Excel file with Excel 2000. The file
contains Textboxes and CommandButtons. The VB code associated code 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 encounter 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. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 code 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 encounter 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. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. . |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Doc,
Check for the word "Missing" in front of any of the checked references. If it is missing uncheck the "Missing" reference. You might have a problem with Late vise Early binding. Doc wrote: *I created an Excel file with Excel 2000. The file contains Textboxes and CommandButtons. The VB code associated code 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 encounter 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. * --- Message posted from http://www.ExcelForum.com/ |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Doc,
Okay, I could have explained that better. If one were "missing" it would have denoted it as such. If Excel is "looking" for a particular Reference library and it doesn't find it, it'll show up on that Library list as missing. What sometimes happens between versions is that the library referenced by the older version is not compatible with the library in the newer version. Anyway, since none came up as missing, I don't think that's your problem. Are they ALL supposed to be checked??? Heavens NO!!! Okay, back to square one..... Post the code that's crashing and indicate which line it crashes on. John "Doc" wrote in 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. . |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. . . |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. . . |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. . . . |
Reply |
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 |