Results 1 to 5 of 5
  1. #1
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    5,016
    Thanks
    0
    Thanked 0 Times in 0 Posts

    DOCVAR equivalents? (2000)

    I'm wondering if XL supports anything like Word's Document Variables. I could see some potential use for these to contain static and calculated sheet & workbook statistics - things like last row used, which might then be referenced in macros. Maybe there's something better for such purposes?

    Alan

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: DOCVAR equivalents? (2000)

    Excel doesn't have document variables, but it does have custom document properties, just like Word. Use the DocumentProperties collection or CustomDocumentProperties collection.

    You can also use a hidden worksheet to store information. If you set the Visible property of a worksheet to xlVeryHidden in the Visual Basic Editor, the user won't be able to unhide it using the Windows menu.

  3. #3
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: DOCVAR equivalents? (2000)

    You mean like

    ActiveSheet.Cells.SpecialCells(xlCellTypeLastCell) .Address
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

  4. #4
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    5,016
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: DOCVAR equivalents? (2000)

    <hr>You mean like
    ActiveSheet.Cells.SpecialCells(xlCellTypeLastCell) .Address
    <hr>
    Yes, that's exactly the kind of thing I was considering <img src=/S/grin.gif border=0 alt=grin width=15 height=15>.
    It was probably not the best example to use, although it might still be useful to globally alias such a property with a short, meaningful name, for use throughout the VBA code.

    Alan

  5. #5
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    5,016
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: DOCVAR equivalents? (2000)

    Thanks Hans. I was thinking of a location with which the casual user couldn't "fiddle". Both of the possibilities you suggest sound useful to this end. I was unaware of "VeryHidden" - I tried to find "ReallyReallyVeryHidden" without success, so I guess it is as the name says. <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

    Alan

Posting Permissions

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