Results 1 to 3 of 3
  1. #1
    Lounger
    Join Date
    Feb 2009
    Posts
    30
    Thanks
    0
    Thanked 0 Times in 0 Posts

    data storage (office 2007)

    One macro writes data to spreadsheet cells, so other macro’s can receive the data later.
    Is there another way to store data - accessible to different macros - other than writing to the spreadsheet?

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

    Re: data storage (office 2007)

    Welcome to Woody's Lounge!

    - You can declare public variables at the top of a module. As long as the workbook is open, all macros in the workbook can set and read these variables. VBA variables aren't saved when the workbook is closed, so you can't use them between sessions.

    - You can store values in custom document properties - look up CustomDocumentProperties in the Object Browser or Excel VBA help. These properties are stored in the workbook, so they will be available across sessions, and they can be used by all macros.

  3. #3
    Lounger
    Join Date
    Feb 2009
    Posts
    30
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: data storage (office 2007)

    Thanks Hans, the public statement worked!

Posting Permissions

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