+ Reply to Thread
Results 1 to 5 of 5

New Worksheet Values Auto Displayed on Sheet 1

  1. #1
    Corey
    Guest

    New Worksheet Values Auto Displayed on Sheet 1

    I have a WorkBook that has a macro that copies worksheet2, and adds it to
    the workbook as worksheet3.
    Want i want to do is have on WorkSheet1 display cells B3 & Z48 values of
    EACH worksheet in the workbook.
    Like:

    Tab Name Name Location

    Sheet1 Fred Bedrock
    Sheet2 Jack BeanStalk
    Sheet3 Adam Eden


    I tried this with simple formula, but IF the worksheet DID NOT exist yet, i
    get an error, because it cannot find the sheet.


    Any idea's how i can display these values from each sheet and each new sheet
    on Sheet1?

    Regards

    Corey



  2. #2
    Corey
    Guest

    Re: New Worksheet Values Auto Displayed on Sheet 1

    Sorry forgot to add, i will have up to 49 sheets in the book before i start
    a new workbook.
    So values from sheets 2-49 need to be displayed on sheet1.
    Corey....



  3. #3
    NickHK
    Guest

    Re: New Worksheet Values Auto Displayed on Sheet 1

    Corey,
    Something like:
    Private Sub Workbook_NewSheet(ByVal Sh As Object)
    Dim i As Long

    For i = 2 To Worksheets.Count
    With Worksheets(1).Range("A1")
    .Offset(i, 0).Value = Worksheets(i).Name
    .Offset(i, 1).Value = Worksheets(i).Range("B3").Value
    .Offset(i, 2).Value = Worksheets(i).Range("Z48").Value
    End With
    Next
    End Sub

    NickHK

    "Corey" <coreymcconnell@splicetech.com.au> wrote in message
    news:eLcqxmjpGHA.4424@TK2MSFTNGP05.phx.gbl...
    > I have a WorkBook that has a macro that copies worksheet2, and adds it to
    > the workbook as worksheet3.
    > Want i want to do is have on WorkSheet1 display cells B3 & Z48 values of
    > EACH worksheet in the workbook.
    > Like:
    >
    > Tab Name Name Location
    >
    > Sheet1 Fred Bedrock
    > Sheet2 Jack BeanStalk
    > Sheet3 Adam Eden
    >
    >
    > I tried this with simple formula, but IF the worksheet DID NOT exist yet,

    i
    > get an error, because it cannot find the sheet.
    >
    >
    > Any idea's how i can display these values from each sheet and each new

    sheet
    > on Sheet1?
    >
    > Regards
    >
    > Corey
    >
    >




  4. #4
    Corey
    Guest

    Re: New Worksheet Values Auto Displayed on Sheet 1

    Thanks Nick.
    Perfect....

    CTM



  5. #5
    NickHK
    Guest

    Re: New Worksheet Values Auto Displayed on Sheet 1

    Corey,
    This code assumes that the first worksheet [Worksheets(1)], does not contain
    data.
    Also that when you add/copy worksheets you specify the location so they do
    not appear as Worksheets(1).

    NickHK

    "Corey" <coreymcconnell@splicetech.com.au> wrote in message
    news:e7ZMHQkpGHA.3324@TK2MSFTNGP05.phx.gbl...
    > Thanks Nick.
    > Perfect....
    >
    > CTM
    >
    >




+ 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