Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error: -2147417848 (80010108). Method 'Text' of object 'IMdcText' fail

Status
Not open for further replies.

StanVX

Programmer
May 19, 2002
1
SG
Will appreciate help on this error - it has bugged me for more than 2 months; and my head is about to roll for it:

developing application using Excel 2000, VBA.

customising a workbook to interact with an add-in (developing this too).

one of the userforms, codes within the add-in,

is to be launched from a customised toolbar button from the workbook.

however, when form is launched, the error (subject title) appears and Excel crashes.

the weird thing is that when the code window has been opened as least once,

and i switch back to the workbook,

click the button to launch the userform,

it is no problem. Entire application runs fine. figures move from workbook to add-in and the other way fine.

however, when I close everything and save; and [testing purpose] re-open the workbook fresh and re-install the add-in,

the above-described error happens. the other userforms are fine.

having read tons of materials from MSDN, there seems to be some early/late binding issue, but I cannot figure out what.

by the way, I have no idea what 'IMdcText'is - it is not created by me and it cannot be found from the objects window.

stepping through one step at a time - I found that the error happens halfway through when zero (literally "0") values are being assigned to the 500 text boxes on the MultiPage on the userform. The funny thing is that the error occurs at different text boxes at different times.

I am totally lost.

In addition, already virus scanned the PC many times - very clean. Also reformatted and reinstalled Windows 2000, MS Office 2000, Visual Studio 6.0








 
automation error by the sounds of it, also 500 text boxes !!!!! why ? would you be better of using a grid control or something ?

normally errors like this can happen because the sytem gets confused

say im transfering data between two excel sheets

I have Wrksht1 and Wrksht2 also i have two ranges on either sheets

Range1 = wrksht1.range("A1:A100")
Range2 = wrksht2.range("A1:A100")

sometimes in your code if you put

range2.values = "1" then it will tri[p sometimes it wont, even though you have referenced it being in wrksht2.

if you change the line too wrksht2.range(Range1).values that normally solves it,

ui know you are workign with some sort of form but hiopefully that gives you some idea of how the error comes up, now where youa re saying codes with the add in this is where your errors could be coming up as your program is not sure whether it needs to make changes to a form in the add in or the ezxcel book you have open. that what it sounds like so go through and make sure your references are spot on , and expand them if you have to .

also a few other thign syou can try

1. add this to the top of your code Application.screenupdating = false

then at the bottom add

application.screenupdating = true

This should sacve you some memory when runnimg

also, have a default value via a If for your text boxes something like

If X (x being the value you want to add) = "" then
mytextbox = 0
else
mytextbox = X
end if

re late and early binding please post and example of your code just your decrlaration and how you are referencing varios bits and pieces and ill tell you if it needs changing


but crash wise i would most definetly put that down to the number of text boxes
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top