Results 1 to 32 of 32

Thread: URGENT!! Please!! One day left!

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Apr 2001
    Posts
    843

    Exclamation URGENT!! Please!! One day left!

    I have only one stupid day left to finish this project!

    I have this problem....

    I just installed Office 97 in my computer. I had Office 2000, but since I am using OLE and the majority of my users will have Office 97... I have to intall in order to compile it with Office 97.

    When I create an excel Object....

    Code:
    Dim excel1 As excel.Application
    Set excel1 = New excel.Application
    
    excel1.Visible = True
    it sends me an error saying that the DLL could not be loaded!!!!!!!

    And even the intelisend doesnt give the option for excel.Application

    HELP!

    I just want to open an excel sheet... and put raw text on it!

    THANKS
    "The difference between mad and genius is the success"

  2. #2
    Addicted Member GungaDin's Avatar
    Join Date
    Apr 2001
    Location
    Brisbane, Australia
    Posts
    146
    Go into Project->References and change your Reference to whatever Microsoft Excel Library you have.

    I would guess that you initially did it in Excel 2000 and Excel 97 has a different library so it is struggling.

    Hope this helps,

    Nathan.

  3. #3
    Addicted Member GungaDin's Avatar
    Join Date
    Apr 2001
    Location
    Brisbane, Australia
    Posts
    146
    Yeah, what he said

    Second comes right after first
    - Buzz Aldrin


  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Apr 2001
    Posts
    843
    Well... you were right... In my references I am poiting to the Excel 9.0 Object Library.... and that is from Office 2000 wich now is gone.... and!!! I cant find the Excel 97 reference! It doesnt give the option.... where could I find it?!?!?
    "The difference between mad and genius is the success"

  5. #5
    Frenzied Member jjortiz's Avatar
    Join Date
    Mar 2001
    Location
    NYC
    Posts
    1,768
    If you cannot find the excel library then try the Microsoft object library.

  6. #6
    Addicted Member GungaDin's Avatar
    Join Date
    Apr 2001
    Location
    Brisbane, Australia
    Posts
    146
    It should be called:

    Microsoft Excel 8.0 Object Library

    The file Name is called EXCEL8.olb so you could try searching for that on your PC and then using the Browse option in your References.

    Hope this helps,

    Nathan.

  7. #7

    Thread Starter
    Fanatic Member
    Join Date
    Apr 2001
    Posts
    843
    jjortiz... Thanks...

    I dont see that reference either! .... do you think I should reinstall it????????
    "The difference between mad and genius is the success"

  8. #8

    Thread Starter
    Fanatic Member
    Join Date
    Apr 2001
    Posts
    843
    I just see the Excel 9.0 one....
    "The difference between mad and genius is the success"

  9. #9
    Addicted Member GungaDin's Avatar
    Join Date
    Apr 2001
    Location
    Brisbane, Australia
    Posts
    146
    Did you uninstall Office 2000 or just put 97 over the top?

    Do you have the file EXCEL8.olb on your PC?

  10. #10
    Frenzied Member jjortiz's Avatar
    Join Date
    Mar 2001
    Location
    NYC
    Posts
    1,768
    Office 2000 does not totally uninstall itself.
    This is where the office olb files are located. See if there is a directory for office9 or just office. Click on browse and find the refrence. I think that the ole file that 9 and 10 use is called MSO.dll and you are refrencing the wrong one. here is the path
    C:\Program Files\Common Files\Microsoft Shared\Office10

  11. #11

    Thread Starter
    Fanatic Member
    Join Date
    Apr 2001
    Posts
    843
    ok.. I did that.... I found the Excel 8 object library ... and I put the reference... The intellisense does give the option now (Excel.Application)... but when I run it... it sends me the error about loading the DLL?

    What could I do?

    Thanks
    "The difference between mad and genius is the success"

  12. #12
    Addicted Member GungaDin's Avatar
    Join Date
    Apr 2001
    Location
    Brisbane, Australia
    Posts
    146
    What is the error?

  13. #13
    Frenzied Member jjortiz's Avatar
    Join Date
    Mar 2001
    Location
    NYC
    Posts
    1,768
    I unsubscribed by mistake. Please ignore this post. Just resubscribing.

  14. #14

    Thread Starter
    Fanatic Member
    Join Date
    Apr 2001
    Posts
    843
    Error 48 in runtime

    there was an error loading the DLL


    "The difference between mad and genius is the success"

  15. #15
    Frenzied Member jjortiz's Avatar
    Join Date
    Mar 2001
    Location
    NYC
    Posts
    1,768
    go here.
    http://msdn.microsoft.com/library/default.asp
    and then click on Office Developer Documentation then Office 97 Documentation then Excel There you will find all the help you need. There is examples. I am not being an ahole, but i am pretty sure that there will be other questions and that is the perfect place to look.

  16. #16

    Thread Starter
    Fanatic Member
    Join Date
    Apr 2001
    Posts
    843
    ok.. let's see....
    "The difference between mad and genius is the success"

  17. #17
    Frenzied Member jjortiz's Avatar
    Join Date
    Mar 2001
    Location
    NYC
    Posts
    1,768
    That should give you plenty of help. Let me know how it works out.

  18. #18

    Thread Starter
    Fanatic Member
    Join Date
    Apr 2001
    Posts
    843
    I am about to throw my computer thru the window !!! (With the Office 97 CD in!)

    I couldnt find anything... normally I would keep my mouth shut... but... like I said... I dont have a lot of help....

    so... I did find the EXCEL8.OLB. I made a reference to it... and nothing.... I found EXCEL8.OLB not in the windows file path. The system path. Are you suppost to register DLL that you want to use.. or do you just make reference to it??

    what else could I try? I alredy unistalled it... reboot.... install it.... reboot! NOTHING
    "The difference between mad and genius is the success"

  19. #19

    Thread Starter
    Fanatic Member
    Join Date
    Apr 2001
    Posts
    843
    ohh .,. and by the way... the excel 9.0 still apperas on thge list!!!!! I think the could be the reazon.... how can I find and delete that THING!?
    "The difference between mad and genius is the success"

  20. #20

    Thread Starter
    Fanatic Member
    Join Date
    Apr 2001
    Posts
    843
    upss... sorry....

    i said:

    but... like I said... I dont have a lot of help....
    what I mean:

    but... like I said... I dont have a lot of TIME!
    "The difference between mad and genius is the success"

  21. #21

    Thread Starter
    Fanatic Member
    Join Date
    Apr 2001
    Posts
    843

    Thumbs up getting close

    OK ok... The Excel 9 object is the once that appears... right? So... what i did.. is .. I went to the excel8.olb file and change it's name to excel9.olb.... I cheated the computer! But... I am afraid when I install it to other computers will look for excel9.olb reference and wont find it and I will be fired....

    but.... if you help me... I will keep my job and I will invite you down here... get some chicks and beers and go to surf....
    "The difference between mad and genius is the success"

  22. #22

    Thread Starter
    Fanatic Member
    Join Date
    Apr 2001
    Posts
    843
    uppss.. forgot to mention something....

    The thing is.. how can I regitry the Excel8.olb.... and delete excel9.olb in the project reference menu... ?

    I dont mean the examine thing....
    "The difference between mad and genius is the success"

  23. #23
    Addicted Member GungaDin's Avatar
    Join Date
    Apr 2001
    Location
    Brisbane, Australia
    Posts
    146
    OK, I'm not sure whether this will help or not but you could try the following from the DOS prompt:

    regsvr32 EXCEL8.olb

    Now, I make no guarantees that it will work but that is how you register a file. I'm only suggesting it as you asked how to register a file. Somebody may have a very good reason for not doing this. I'm not sure.

    If that doesn't work you can unregister with:

    regsvr32 /u EXCEL8.olb

    Something else you could try when uninstalling and re-installing is to actually delete (or probably just move) the EXCEL8.olb file after uninstalling and then re-install. I have known this to help on occasions. Again, this may not work but it is something you can try.

    Keep us posted.

  24. #24

    Thread Starter
    Fanatic Member
    Join Date
    Apr 2001
    Posts
    843
    well... those commands didnt work... BUT....

    I just open the prject references.. and under Excel8.olb... now actualy says it is making reference to the EXCEL8.olb library.... even though I know it is making reference to the "EXCEL9.olb" b/c I changed the name EXCEL8.olb to EXCEL9.olb in order to cheat the computer......

    You think this will be enouigh to work in a different computer?
    "The difference between mad and genius is the success"

  25. #25
    Frenzied Member jjortiz's Avatar
    Join Date
    Mar 2001
    Location
    NYC
    Posts
    1,768
    Also delete the msoffice dir. and in the common dir. The path is up above delete the msoffice dir thier. I wish i could help. Now what exactly do you want to do with excel. Open the file in their. Or like you said just pass information to it. I just remembered one thing. Office 2k is compatible with office 97 docs. So it will open it. Or if i am wrong. You can write to the file with the ref that you have and then look for the app association and open it with that.

  26. #26
    Addicted Member GungaDin's Avatar
    Join Date
    Apr 2001
    Location
    Brisbane, Australia
    Posts
    146
    I would be surprised if renaming the files worked on other PC's. It seems like a very odd situation.

    That being said, it can't hurt to try if you have a PC with Excel 97. I would be interested to know if it does work or not.

  27. #27
    Frenzied Member jjortiz's Avatar
    Join Date
    Mar 2001
    Location
    NYC
    Posts
    1,768
    Read this and tell me if this may help.

    If you want to open a workbook that's saved in the folder that contains the executable file, you can use the Path property to return a string that specifies the folder. The PathSeparator property returns the correct separator character for the current file system (for example, a backslash (\) for MS*DOS®/Windows® FAT, or a colon ( for the Macintosh®). The following example shows file*system*independent code you can use to open Book1.xls, assuming that Book1.xls is saved in the folder that contains the executable file.

    Sub OpenBook1()
    EXEPath = Application.Path & Application.PathSeparator
    fName = EXEPath & "BOOK1.XLS"
    Set myBook = Workbooks.Open(Filename:=fName)
    MsgBox myBook.Worksheets(1).Range("A1").Value
    End Sub



    The other relatively safe place to store a workbook is in the Library folder. You can use the LibraryPath property instead of the Path property to return a string that specifies the Library folder. The following code shows how you would alter the preceding example to use the LibraryPath property.

    Sub OpenBook1()
    LibPath = Application.LibraryPath & Application.PathSeparator
    fName = LibPath & "BOOK1.XLS"
    Set myBook = Workbooks.Open(Filename:=fName)
    MsgBox myBook.Worksheets(1).Range("A1").Value
    End Sub


    Instead of hard*coding a file name with the Open method, you may want to give the user the option of selecting a file to open. The GetOpenFilename method displays the standard Open dialog box, but the method returns a string instead of opening a file. The string contains the fully qualified path and file name. The following example demonstrates the GetOpenFilename method by displaying the return value in a message box and then opening the file.

    Sub DemoGetOpenFilename()
    Do
    fName = Application.GetOpenFilename
    Loop Until fName <> False
    MsgBox "Opening " & fName
    Set myBook = Workbooks.Open(Filename:=fName)
    End Sub

  28. #28

    Thread Starter
    Fanatic Member
    Join Date
    Apr 2001
    Posts
    843
    Actually... I think the Office 2000 dlls are not compatible with the 97... I know this.. b/c I alredy tried it.... But... seems to be that it will work now... and if it doesnt.. i will just compile it somewhere... where? I dont know yet!
    "The difference between mad and genius is the success"

  29. #29
    Frenzied Member jjortiz's Avatar
    Join Date
    Mar 2001
    Location
    NYC
    Posts
    1,768
    You might screw up their current version. Or enhance it with 2k functionality. I agree with ryebread on this.
    Originally posted by RyeBread
    Your target PC's are all 97, and it sounds like you have successfully set the correct reference to 97's object library.

    You should have no problem getting this to run properly on a Office97 machine. I would not include any Office object DLL files in your Setup, that would not be a good thing.

    Good luck, it sounds like a winner to me.

  30. #30
    pathfinder NotLKH's Avatar
    Join Date
    Apr 2001
    Posts
    2,397
    Hi Andreex,

    Had a thought, but I haven't done the code for this
    specifically.

    However, if you have any skill with codeing for access MDB files,
    perhaps you could link your excell file to a parent access mdb?, then code for the mdb instead?

    I placed some entries into a dummy excell worksheet, and saved it as a .xls file, then with access linked it to a .mdb dummy file.

    Access read the excell file fine!

    Now, again in this specific instance, I haven't coded anything, but a while ago, I was trying to get the hang of programmically tieing into my company's database engine. I was not succeeding, but i created a work around when I found out about the linking capabilities of Access mdb files. It worked great, giving me by proxy all the power i needed to read from and write to my target!. Since then I've figured out dsn'less connections and I don't need it anymore, but it just might work for you in this emergency, until you can figure out a more permanent, direct, solution.

    -Hope this helps,
    -Lou

    -Ps: I saw your desparate plea for help too late to do any codeing tonight, but if you're still around in 8 or 9 hours, first thing in the morning I'll see if I can develop a simple source code, and attach it with a Sample Excell linked to a Sample Access, displaying the code to pass values in and out of the excell thru access. Of course this is assuming Access And/Or Dao is available on your computer.

    -Deep Breaths.....Relax....Stoke up That Coffee
    -Brilliance Shines when Desperation Strikes!

  31. #31

    Thread Starter
    Fanatic Member
    Join Date
    Apr 2001
    Posts
    843

    Good recomendations

    humm.. it sounds interesting what you are saying. I might not use it or try to code it right now b/c I am runnig out of time and I still have to do some other things. But I would like to see your code if you want to post it. It sounds like something I could use soon.

    I am feeling better... I went downstairs.... eat a couple of sandwiches with a beer..... and.... it helped. he he....

    Well... THANKS for everybody for helping me!

    the invitation is still open.... (Flight expenses not included)
    "The difference between mad and genius is the success"

  32. #32
    Frenzied Member jjortiz's Avatar
    Join Date
    Mar 2001
    Location
    NYC
    Posts
    1,768
    Cool. I hope that you complete your project. I know what it feels. Like. I had to stay at work till 10:00 est time on monday to finish a project that needed to be done on tues. I finally got it done.

    My boss has this picture on his wall.
    and it says the following. I am pretty sure many of you have heard it.

    : When under Pressure.
    Act like a duck.
    Calm on top, but under the water paddling like hell.

    I thought that was funny.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width