Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Sat Dec 07, 2019 12:59 am
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: Dim excel as New ExcelApplication crashes on Windows7
PostPosted: Mon Sep 24, 2012 5:01 pm 
Offline

Joined: Thu Aug 16, 2007 11:37 am
Posts: 30
My app that runs just fine on Vista crashes at the statement:

Dim excel as New ExcelApplication

on my new laptop running Windows7

Is there anything specific that I need to have for Windows7?

Thank you
Pasko


Top
 Profile  
Reply with quote  
 Post subject: Re: Dim excel as New ExcelApplication crashes on Windows7
PostPosted: Mon Sep 24, 2012 5:23 pm 
Offline

Joined: Fri Jan 06, 2006 3:21 pm
Posts: 12388
Location: Portland, OR USA
Do you have Excel installed?


Top
 Profile  
Reply with quote  
 Post subject: Re: Dim excel as New ExcelApplication crashes on Windows7
PostPosted: Mon Sep 24, 2012 8:54 pm 
Offline

Joined: Mon Jan 02, 2006 11:43 am
Posts: 172
Location: Calgary, Alberta, Canada
Hello Pasko,

I tried the following code on my Windows 7, Excel 2010, Real Studio 2012 r1 system, and it worked well.

Dim excel as new ExcelApplication  //create a new object
excel.visible = true //show the excel application
excel.workbooks.add //add a workbook to the application

excel.Range("A1").value = "Gallons" //Place text in the cell

excel = Nil // Set the object to Nil

Exception err as OLEException //Check for Errors
MsgBox str(err) //Display the Error


Could you give this a try? What versions of Windows, Office, and Real Studio are you running?

Sincerely,

Eugene


Top
 Profile  
Reply with quote  
 Post subject: Re: Dim excel as New ExcelApplication crashes on Windows7
PostPosted: Tue Sep 25, 2012 11:09 am 
Offline

Joined: Thu Aug 16, 2007 11:37 am
Posts: 30
I found out that the VBA was messed up on my machine. Duh! Which brings me to the next thought or question, I should say: will the RB executable run on machines with no Office or VBA? I have no way to test it because I am not allowed to remove Office, as you might have guessed it.
Thank you
Pasko


Top
 Profile  
Reply with quote  
 Post subject: Re: Dim excel as New ExcelApplication crashes on Windows7
PostPosted: Tue Sep 25, 2012 11:44 am 
Offline
Real Software Engineer

Joined: Sat Dec 24, 2005 8:18 pm
Posts: 7858
Location: Canada, Alberta, Near Red Deer
pasko wrote:
I found out that the VBA was messed up on my machine. Duh! Which brings me to the next thought or question, I should say: will the RB executable run on machines with no Office or VBA? I have no way to test it because I am not allowed to remove Office, as you might have guessed it.
Thank you
Pasko


No
Without Office the required OLE objects & libraries will not be present

_________________
Norman Palardy (Real Software)


Top
 Profile  
Reply with quote  
 Post subject: Re: Dim excel as New ExcelApplication crashes on Windows7
PostPosted: Tue Sep 25, 2012 12:37 pm 
Offline

Joined: Thu Aug 16, 2007 11:37 am
Posts: 30
Do you know of a place where these libraries can be downloaded from?


Top
 Profile  
Reply with quote  
 Post subject: Re: Dim excel as New ExcelApplication crashes on Windows7
PostPosted: Tue Sep 25, 2012 2:32 pm 
Offline
Real Software Engineer

Joined: Sat Dec 24, 2005 8:18 pm
Posts: 7858
Location: Canada, Alberta, Near Red Deer
pasko wrote:
Do you know of a place where these libraries can be downloaded from?

No - they need to be installed & registered properly which is taken care of when Office is installed.

_________________
Norman Palardy (Real Software)


Top
 Profile  
Reply with quote  
 Post subject: Re: Dim excel as New ExcelApplication crashes on Windows7
PostPosted: Tue Sep 25, 2012 3:06 pm 
Offline

Joined: Fri Jan 06, 2006 3:21 pm
Posts: 12388
Location: Portland, OR USA
They wouldn't work without Office anyway.


Top
 Profile  
Reply with quote  
 Post subject: Re: Dim excel as New ExcelApplication crashes on Windows7
PostPosted: Tue Sep 25, 2012 8:43 pm 
Offline

Joined: Mon Jan 02, 2006 11:43 am
Posts: 172
Location: Calgary, Alberta, Canada
Hello Pasko,

Windows offers a free Excel viewer that can be downloaded here: http://support.microsoft.com/kb/913879. Installing this program should install and register all of the libraries needed for Excel to run on Windows.

The last time that I installed the Windows 7 OS, the code from my book worked with the viewer. The updated version of Excel may have changed but it worked at the time. I have written a book on programming Excel in Windows. You can view the Table of Contents for the Excel book here: http://scispec.ca/Realbasic/Publish/Publish.htm

I hope this helps,

Eugene
I Wish I Knew How To... Program Excel 2010 with REALStudio in Windows
I Wish I Knew How To... Program Access 2010 with REALStudio Desktop Apps in Windows
I Wish I Knew How To... Program Word 2010 with REALStudio in Windows


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group