Solved

Embedding Excel 97 spreadsheets

Posted on 1998-06-01
1
148 Views
Last Modified: 2010-05-03
I am embedding an Excel 97 worksheet into my application (setting the class as Excel.Sheet.8). When I try and set a value in a cell using the follwing line :

OLE1.object.Worksheets("Sheet1").Range("R1C1").Value = 100

I get run-time error '1004'. If I use the A1 reference style it works but unfortunately I need to use the R1C1 style. I've tried various themes on the above line (like taking the quotes out etc) but none of them work. Excel help is of no particular use. Please help!!!

John
0
Comment
Question by:jgill
1 Comment
 
LVL 5

Accepted Solution

by:
bin_huwairib earned 50 total points
ID: 1462179
jgill,

To use R1C1 style do the following:

OLE1.object.Worksheets("Sheet1").Range("B1").FormulaR1C1 = "100"


Best regards
Bin Huwairib
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question