LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Cursor Movement vs. Range Reference

I am opening an XML file in Excel 2002 and performing some data
manipulation (via macros) in Excel before linking the newly saved Excel
file to Microsoft Access 2000.

Once the XML file is opened in Excel, it displays all table headings in
numerous columns on the first row. For example, a table heading could
be: "/PROJECT/AREAS/TEXTEXEC1". All data for this heading begins in
this column on the second row and so forth. While all XML files that I
use will have the tableheadings that I need, there are certain XML
files that will not list tableheadings is there is no data associated
with that particular project file. As a result,
"/PROJECT/AREAS/TEXTEXEC1" could be located in column Z for one file
and column AB in another. This is where I have a problem. The macros
written by the Record Macro function uses column (range) references
when I actually need it to refer to cursor positions relative to
"/PROJECT/AREAS/TEXTEXEC1". Since the column where this dataset is
located may vary between Excel files, I need to build my references to
cursor positions in relation to the cell that /PROJECT/AREAS/TEXTEXEC1
is located. In addition, I am trying to Text to Columns that data in
that column and I don't know how via Macros to anchor the cursor and
highlight a range of say 500 rows.

The following is my current macro with range references that I need to
convert to reference off my tableheading:

Cells.Find(What:="/PROJECT/AREAS/FOLDER/AREA/STEP/TEXTEXEC2", After:= _
ActiveCell, LookIn:=xlFormulas, LookAt:=xlPart,
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False,
SearchFormat:=False).Activate
Range("AO1").Select
Selection.EntireColumn.Insert
Range("AN2:AN578").Select
Selection.TextToColumns Destination:=Range("AN2"),
DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote,
ConsecutiveDelimiter:=False, Tab:=False, _
Semicolon:=False, Comma:=True, Space:=False,
Other:=False, FieldInfo _
:=Array(Array(1, 1), Array(2, 1)),
TrailingMinusNumbers:=True
Range("AN1").Select
Selection.AutoFill Destination:=Range("AN1:AO1"), Type:=xlFillDefault
Range("AN1:AO1").Select

******
Any Help would be appreciated!!!

 
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
Movement of the cursor tran1728 Excel Discussion (Misc queries) 4 May 8th 10 05:28 AM
CURSOR MOVEMENT Aligahk06 Excel Discussion (Misc queries) 3 September 9th 09 04:55 PM
how can I limit cursor movement within specified range in excel? slk0217 Excel Discussion (Misc queries) 2 January 5th 08 06:03 AM
how to confine the range of movement of cursor starwil[_2_] Excel Programming 2 May 27th 04 10:16 AM
how to confine the range of movement of cursor starwil[_2_] Excel Programming 6 May 24th 04 03:38 PM


All times are GMT +1. The time now is 08:44 AM.

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

About Us

"It's about Microsoft Excel"