Did not make myself clear

rdrum

New Member
Joined
Mar 28, 2002
Messages
16
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
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
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
 
Upvote 0
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
 
Upvote 0
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
 
Upvote 0

Forum statistics

Threads
1,213,484
Messages
6,113,924
Members
448,533
Latest member
thietbibeboiwasaco

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top