Solved

Embedding Excel 97 spreadsheets

Posted on 1998-06-01
1
149 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

734 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