View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
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++?