06-09-2006 06:07 AM - edited 06-09-2006 06:07 AM
Message Edité par TiTou le 06-09-2006 01:08 PM
We have two ears and one mouth so that we can listen twice as much as we speak.
Epictetus
06-09-2006 07:21 AM
06-09-2006 07:31 AM
We have two ears and one mouth so that we can listen twice as much as we speak.
Epictetus
06-09-2006 07:54 AM
Some basics... When you start Excel you will probably need to active the VBA side of things. In Excel got Tools->Add-In and check Analysis Toolpak and Analysis Toolpak-VBA options. From here you can right click on the excel toolbar and select the vba editor toolbar.
So I am thinking are there any unique markers in your xls file that indicates the end of the dataset. I recorded a macro to search for a marker and I arrived at this
Range("A1").Select
Cells.Find(What:="#### END OF DATA ####", After:=ActiveCell, LookIn:= _
xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:= _
xlNext, MatchCase:=False, SearchFormat:=False).Activate
myRow = ActiveCell.Row
myCol = ActiveCell.Column
When you record a macro in excel it translates your actions into VBA which is a great way of getting your baseline. In this case, this is me clicking cell A1, going to the edit menu, selecting Find then executing the search. I then stopped the macro and hopped over to the VBA editor to look at the objects, methods and properties used for the task.
The bits in red are my additions to the macro I just recorded to get the row and column of the unique marker.
Maybe there isn't any unique marker for the data bounds? Maybe you can add one?
David
06-09-2006 09:52 AM
There's always that mass of hard to navigate documentation available at MSDN. Probably harder than using VBA help
06-09-2006 10:18 AM
Hey Mug-bearer!
No one else mentioned it yet so I will.
If you do a custom install for the MS Office products you can select "Help for VBA".
That will let you use the "Help>>>...." from the LV diagram to figure out what the functions do.
Ben
06-09-2006 10:34 AM
06-09-2006 10:35 AM
06-09-2006 10:38 AM
06-09-2006 11:32 AM
Hi Titou,
you want to use the usedrange property item.