Thanks Thanks:  0
Likes Likes:  0
Results 1 to 4 of 4

Thread: Did not make myself clear

  1. #1
    New Member
    Join Date
    Mar 2002
    Location
    Yuba City, Ca.
    Posts
    16
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    daleyman gave me this formula
    Private Sub Workbook_sheetActivate(ByVal Sh As Object)

    Sh.Range("ba37")=Sheets("source_sheet_name").Range("ba41")
    End Sub

    I can`t get the xxxx thing to work for me, what I`m trying to do is get my total number cell (ba41) to go to the subtotal cell (ba37) when I create a new sheet, and to do the same thing each day I made a new sheet. Thankx.

    [ This Message was edited by: rdrum on 2002-03-30 07:28 ]

  2. #2
    MrExcel MVP Ivan F Moala's Avatar
    Join Date
    Feb 2002
    Location
    Auckland, New Zealand
    Posts
    4,209
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    On 2002-03-30 07:27, rdrum wrote:
    daleyman gave me this formula
    Private Sub Workbook_sheetActivate(ByVal Sh As Object)

    Sh.Range("ba37")=Sheets("source_sheet_name").Range("ba41")
    End Sub

    I can`t get the xxxx thing to work for me, what I`m trying to do is get my total number cell (ba41) to go to the subtotal cell (ba37) when I create a new sheet, and to do the same thing each day I made a new sheet. Thankx.

    [ This Message was edited by: rdrum on 2002-03-30 07:28 ]
    2 things;
    1) Where have you put the code
    should go into the Thisworkbook object
    eg Alt F11 > Ctrl + R > double click
    Thisworkbook
    Paste code
    2) Have you referenced the name of the sheet
    in the code ?? currently you have
    "source_sheet_name"


    Ivan

  3. #3
    Board Regular
    Join Date
    Mar 2002
    Location
    London, UK
    Posts
    167
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    my understanding is that you have a value in a set constant sheet, for example called "source_sheet_name" which you can substitute for the sheet name of your choice, at cell BA41, which you want appended to cell BA37 of any new sheet.

    send me the workbook i may have a better idea...

    david@monnetqos.com


  4. #4
    MrExcel MVP Ivan F Moala's Avatar
    Join Date
    Feb 2002
    Location
    Auckland, New Zealand
    Posts
    4,209
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Perhaps te code should be....

    Private Sub Workbook_NewSheet(ByVal Sh As Object)
    Sh.Range("ba37") = Sheets("source_sheet_name").Range("ba41")
    End Sub

    Applied to the 2 pts I gave above ??
    since you want it to run when you add
    a new sheet....


    Ivan

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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