Consulting

Results 1 to 2 of 2

Thread: random problem

  1. #1

    random problem

    using Excel and VBA i have been designing a stress analysis tool for my company. i am now required to make this tool which consists of 5 pages to operate over one window. i need code to show a page or window in which numbers can be inputted and then calculations done.

    i can't think of a way with userforms so i pressume i will have ot just use code to hide excel sheets?

    i'm stumped on this!!!

  2. #2
    Administrator
    VP-Knowledge Base
    VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    Hi Rodney,
    There's a KB item here which creates an index of worksheets. The following ThisWorkBook module code will show/hide sheets when accessed using the hyperlinks
    [VBA]Private Sub Workbook_SheetDeactivate(ByVal Sh As Object)
    If Sh.Name <> "Sheet1" Then
    Sh.Visible = False
    End If
    End Sub

    Private Sub Workbook_SheetFollowHyperlink(ByVal Sh As Object, ByVal Target As Hyperlink)
    If Sh.Name <> "Sheet1" Then Exit Sub
    Sheets(Target.TextToDisplay).Visible = True
    Sheets(Target.TextToDisplay).Activate
    End Sub


    [/VBA]
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

Posting Permissions

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