Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Excel - ways to find out where you are
Message
De
30/06/2011 08:20:10
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Database:
Visual FoxPro
Divers
Thread ID:
01516755
Message ID:
01516845
Vues:
50
>In Visual FoxPro using automation (VBA) code to move around in EXCEL, I know that I can move down one row by doing something like:
>
>oRange = oRange.Offset(1,0)
>
>Or I can find out the last Row where something was actually written to a row and column, as follows:
>
>lnLastRow = oSheet.UsedRange.Rows.Count
>
>But, what other ways are there? For example, how can you know where you stand with a ROW or COL OffSet?
>
>What other ways can you find out where you are at any moment in an Excel file when loading data to it?

Something like

oRange.Select()

and then checking the properties of excel.selection is all that comes to mind. Because in terms of Excel, question of "where am I" is answered with "you are in the cell you last clicked", and you get to feel full empathy with your mouse arrow, because that's what "I" means in this context.

In your context, I guess you may mean "where am I" in the sense "what are the coordinates of oRange". Look at oRange in the debugger - and if the debugger doesn't see its properties, try in the command window, type oRange and a dot - intellisense should know. Just try to display the properties of interested, and then the debugger will know too (yep, intellisense is smarter than the debugger in reading the typelibs).

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform