Active Cell VB . NET

  • Thread starter Thread starter 11Oppidan
  • Start date Start date
1

11Oppidan

Hi,

Does any one know the synatax for setting the postion of the active cell
using row and column integers rather then "A2", in a VB. NET addin built
using VS 2003.

I can get oApp.range("A2").activate() to work but not oApp.range(int1,
int2).activate()

Many thanks in advance.
 
Have tried that one - I get a system.runtime.interlopservices.COMException
additional information: Exception from HRESULT :0x800A03EC error.
 
Can't tell you what that is all about, but in VBA, cells is what is used in
this situation.

Application does have a cells property in the object model.

As a kludge, maybe you can anchor to A1 and work an offset

oApp.Range("A1").Offset(int1-1,int2-1).Activate
 
Thanks that works - you're a genius!

Tom Ogilvy said:
Can't tell you what that is all about, but in VBA, cells is what is used
in
this situation.

Application does have a cells property in the object model.

As a kludge, maybe you can anchor to A1 and work an offset

oApp.Range("A1").Offset(int1-1,int2-1).Activate
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top