Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Embedding Excel 97 spreadsheets

Posted on 1998-06-01
1
Medium Priority
?
151 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 100 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
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…
Suggested Courses

688 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