Results 1 to 6 of 6

Thread: Getting OLEexception while trying to run Microsoft Excel with RealBasic

  1. #1
    Join Date
    Jun 2004
    Posts
    65

    Getting OLEexception while trying to run Microsoft Excel with RealBasic

    I have installed RealBasic on the computer of mine as well installed Microsoft Excel. Well I am getting an exception whenever I am trying to run Microsoft Excel from RealBasic. I don’t know why the above mentioned issue is happening into the situation of mine. Let me know if you are having the same problem which I have mentioned over here? I am waiting for the prompt replies of yours. Thanks a lot in advance.

  2. #2
    Join Date
    May 2009
    Posts
    637

    Re: Getting OLEexception while trying to run Microsoft Excel with RealBasic

    Well looking at the problem which you have mentioned over here I wanted to know which version of operating system do you have installed on the system? Tell me which version of the RealBasic and Microsoft Excel do you have installed on the computer? you told me that you are getting an error message on the system of yours so post the entire error message so that I can figure out the root cause of the problem.

  3. #3
    Join Date
    May 2009
    Posts
    527

    Re: Getting OLEexception while trying to run Microsoft Excel with RealBasic

    In this particular problem I am suggesting following code which you should run on the computer of yours.
    Code:
    Dim excel As New OLEObject("Excel.Application")
    excel.Visible = True
    excel.Workbooks.Add
    I am hoping that the above mentioned code will help you to fix the matter of yours.

  4. #4
    Join Date
    Apr 2009
    Posts
    488

    Re: Getting OLEexception while trying to run Microsoft Excel with RealBasic

    Let me know whether the previously mentioned code is working for you or not. If there is no change in the situation than you can try to fix the matter by using the following code.
    Code:
    Dim excel As Object
    Set excel = CreateObject("Excel.Application")
    excel.Visible = True
    excel.Workbooks.Add

  5. #5
    Join Date
    May 2009
    Posts
    539

    Re: Getting OLEexception while trying to run Microsoft Excel with RealBasic

    Well I was also having the same problem which you have mentioned over here and I have run the following command and luckily it worked for me and I am not having issue. So you can try the code which I have mentioned over here and I am hoping that it will be useful to you.
    Code:
    dim exlApplication As ExcelApplication
    dim wrkTest As ExcelWorkbook
      
    exlApplication = new ExcelApplication
    exlApplication.Visible = True
      
    wrkTest = exlApplication.Workbooks.Add

  6. #6
    Join Date
    Apr 2009
    Posts
    569

    Re: Getting OLEexception while trying to run Microsoft Excel with RealBasic

    Do you have tried to do VBA automation on the office such as opening the word or excel workbook. If it is not working for you then there should be change into the office automation engine. I am not sure but there could be something wrong with the setup of the software. Hence I recommend that you should reinstall both Excel as well as RealBasic on the computer of yours and see whether you have resolved the matter or not.

Similar Threads

  1. Excel is only printing half page in Microsoft Excel
    By (Cowherd) in forum MS Office Support
    Replies: 2
    Last Post: 17-02-2012, 04:31 PM
  2. Replies: 6
    Last Post: 17-02-2012, 01:18 PM
  3. Replies: 4
    Last Post: 13-02-2011, 10:37 AM
  4. what is REALbasic?
    By Jagruti23 in forum Software Development
    Replies: 4
    Last Post: 26-02-2010, 10:08 AM
  5. Replies: 2
    Last Post: 10-03-2009, 10:50 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,307,404.38962 seconds with 17 queries