+ Reply to Thread
Results 1 to 2 of 2

Custom Views

  1. #1
    Stu W
    Guest

    Custom Views

    I have written an application that formats a spreadsheet using data that a
    user pastes into it. This spreadsheet that gets formatted is any spreadsheet
    within the workbook that the application was built for. Any of the
    spreadsheets that gets formatted are all formatted the same way, with the
    same column layout, headers, etc.

    There are different users of this application, and each has their own
    preference for which columns get hidden for any given situation. So, I'd
    like to have each user be able to define their own set of Custom Views that
    they can save with the Excel workbook, and then select the Custom View to use
    for any given sheet.

    In testing, it seems that each Custom View is somehow linked to the
    worksheet that it was created for, and cannot be applied to any other
    worksheet. Is there a way that a Custom View can be altered in VBA to work
    with a sheet other than the one it was created with? Any other ideas about
    how to approach this?

  2. #2
    NickHK
    Guest

    Re: Custom Views

    AFAIK, Custom Views are associated with the workbook, as each can contain
    multiple windows, sheets etc.
    As you can neither read the info associated with a view nor apply it to
    another workbook, you would have to determine yourself the changes applied
    for each views; I don't think is advisable.
    The alternative is put the current data into a WB that contains the various
    views.

    If it is a single WB that all users access, you could provide a list of
    views based on the Username, if the views are named appropriately e.g
    John_TotalsOnly, Mary_TotalsOnly.
    Then loop through all the views, only adding those to a listbox that are
    LIKE Environ("Username").

    Or if it's only hide/unhide rows/columns, you could save some suitable data
    in the users personal.xls and apply those settings to the
    ActiveSheet/ActiveWorkbook when triggered by the user from a button/menu
    entry.

    A few ideas anyway..

    NickHK

    "Stu W" <StuW@discussions.microsoft.com> wrote in message
    news:7492D6E6-7B65-47D5-BD1C-24561B17EB35@microsoft.com...
    > I have written an application that formats a spreadsheet using data that a
    > user pastes into it. This spreadsheet that gets formatted is any

    spreadsheet
    > within the workbook that the application was built for. Any of the
    > spreadsheets that gets formatted are all formatted the same way, with the
    > same column layout, headers, etc.
    >
    > There are different users of this application, and each has their own
    > preference for which columns get hidden for any given situation. So, I'd
    > like to have each user be able to define their own set of Custom Views

    that
    > they can save with the Excel workbook, and then select the Custom View to

    use
    > for any given sheet.
    >
    > In testing, it seems that each Custom View is somehow linked to the
    > worksheet that it was created for, and cannot be applied to any other
    > worksheet. Is there a way that a Custom View can be altered in VBA to

    work
    > with a sheet other than the one it was created with? Any other ideas

    about
    > how to approach this?




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1