Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Excel Application.SetReferenceStyle

Trying to get a range using the R1C1 nomenclature, the following code fails:

objApp.SetReferenceStyle((long) (-4150)); // xlR1C1
lpDispatch = objSheet.GetRange(COleVariant("R1C1"), COleVariant("R1C1"));

How do you use R1C1 addressing in [MFC] C++?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Excel Application.SetReferenceStyle

I suspect you need to use A1 style referencing. The set reference style
you have is the same as going into Tools=Options=General tab, reference
style. However, in the object model, the range object expects A1 style
referencing regardless of this setting.

--
Regards,
Tom Ogilvy

"Where am I?" wrote in message
...
Trying to get a range using the R1C1 nomenclature, the following code

fails:

objApp.SetReferenceStyle((long) (-4150)); // xlR1C1
lpDispatch = objSheet.GetRange(COleVariant("R1C1"), COleVariant("R1C1"));

How do you use R1C1 addressing in [MFC] C++?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Excel Application.SetReferenceStyle

1. Is there another way to address cells using indicies?

In other words, how would you do this from C++:

Worksheets("Sheet1").Cells(6, 1).Value = 10

2. No arguments for GetCells() function? What does it return?

3. Where do you find documentation on these functions?

"Tom Ogilvy" wrote:

I suspect you need to use A1 style referencing. The set reference style
you have is the same as going into Tools=Options=General tab, reference
style. However, in the object model, the range object expects A1 style
referencing regardless of this setting.

--
Regards,
Tom Ogilvy

"Where am I?" wrote in message
...
Trying to get a range using the R1C1 nomenclature, the following code

fails:

objApp.SetReferenceStyle((long) (-4150)); // xlR1C1
lpDispatch = objSheet.GetRange(COleVariant("R1C1"), COleVariant("R1C1"));

How do you use R1C1 addressing in [MFC] C++?




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Application.GetOpenFilename vs Application.Dialogs(xlDialogsOpen) Paul Martin Excel Programming 5 August 5th 05 04:44 PM
Replace application.RTD property by Application.RTDServers collect John.Greenan Excel Programming 1 July 7th 05 02:05 PM
2 excel application tom taol Excel Programming 2 January 17th 05 03:37 AM
macro to close excel application other than application.quit mary Excel Programming 1 September 14th 04 03:43 PM
application.quit will not shut off application john Excel Programming 0 January 9th 04 11:29 PM


All times are GMT +1. The time now is 12:18 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"