Results 1 to 4 of 4

Thread: a quick question

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Nov 2005
    Posts
    24

    a quick question

    Hi just a quick query

    i have the following tags in my document

    <row 1>
    <Unit colname="xxx" align="right"><p>ABCDEFGHI</p></Unit>
    <Unit colname="xxx" align="right"><p>ABCDEFGHI</p></Unit>
    <Unit colname="xxx" align="right"><p>ABCDEFGHI</p></Unit>
    <Unit colname="xxx" align="right"><p>ABCDEFGHI</p></Unit>
    <Unit colname="xxx" align="right"><p>ABCDEFGHI</p></Unit>
    <Unit colname="xxx" align="right"><p>ABCDEFGHI</p></Unit>
    <Unit colname="xxx" align="right"><p>ABCDEFGHI</p></Unit>
    </row 1>
    <row 2>
    <Unit colname="xxx" align="right"><p>ABCDEFGHI</p></Unit>
    <Unit colname="xxx" align="right"><p>ABCDEFGHI</p></Unit>
    <Unit colname="xxx" align="right"><p>ABCDEFGHI</p></Unit>
    <Unit colname="xxx" align="right"><p>ABCDEFGHI</p></Unit>
    <Unit colname="xxx" align="right"><p>ABCDEFGHI</p></Unit>
    <Unit colname="xxx" align="right"><p>ABCDEFGHI</p></Unit>
    <Unit colname="xxx" align="right"><p>ABCDEFGHI</p></Unit>
    </row 2>

    i need to number the "xxx" values withing the <row> and </row> tags.. So within each <row> </row> block the numbers should begin from 1 onwards.

    example

    <row 1>
    <Unit colname="1" align="right"><p>ABCDEFGHI</p></Unit>
    <Unit colname="2" align="right"><p>ABCDEFGHI</p></Unit>
    <Unit colname="3" align="right"><p>ABCDEFGHI</p></Unit>
    </row 1>
    <row 2>
    <Unit colname="1" align="right"><p>ABCDEFGHI</p></Unit>
    <Unit colname="2" align="right"><p>ABCDEFGHI</p></Unit>
    <Unit colname="3" align="right"><p>ABCDEFGHI</p></Unit>
    </row 2>...and so on.

    is this possible?

  2. #2
    Frenzied Member
    Join Date
    May 2004
    Location
    Carlisle, PA
    Posts
    1,045

    Re: a quick question

    Hey ... please give us a little more information about your application ...

    Is this a Word document? Are all of your tags guaranteed to be on separate lines?

    I haven't done many Word VBAs, but certainly this can be done. I can easily tell you how to do it in Excel ...
    Blessings in abundance,
    All the Best,
    & ENJOY!

    Art . . . . Carlisle, PA . . USA

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Nov 2005
    Posts
    24

    Re: a quick question

    yes this is a word document. and yes the tags are guaranteed to be on separate lines

  4. #4
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: a quick question

    Is this just text in your document or are we looking at data in a Table?
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width