Solved

Embedding Excel 97 spreadsheets

Posted on 1998-06-01
1
150 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

[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

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…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…
Suggested Courses
Course of the Month10 days, 1 hour left to enroll

623 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