Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I need a code that will copy the content of cells A12:E42 on worksheet A to the cells of B10:F51 on worksheet B. This code must be added to worksheet B simply becuase worksheet A has a ton of code on it already. I would perfer for this to happen automatically but I will be very happy if this even has to be added as a button on worksheet B. I am very new at this so please inform me of code and where this code should be placed Thank you for your support. -- oberon.black ------------------------------------------------------------------------ oberon.black's Profile: http://www.excelforum.com/member.php...o&userid=26732 View this thread: http://www.excelforum.com/showthread...hreadid=466659 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Private Sub Worksheet_Activate()
Worksheets("A").Range("A12:E42").Copy _ Destination:=Me.Range("B10") End Sub Right click on the sheet tab of Worksheet B and select view code. Put in code like the above. -- Regards, Tom Ogilvy "oberon.black" wrote in message news:oberon.black.1v7qaa_1126472721.1266@excelforu m-nospam.com... I need a code that will copy the content of cells A12:E42 on worksheet A to the cells of B10:F51 on worksheet B. This code must be added to worksheet B simply becuase worksheet A has a ton of code on it already. I would perfer for this to happen automatically but I will be very happy if this even has to be added as a button on worksheet B. I am very new at this so please inform me of code and where this code should be placed Thank you for your support. -- oberon.black ------------------------------------------------------------------------ oberon.black's Profile: http://www.excelforum.com/member.php...o&userid=26732 View this thread: http://www.excelforum.com/showthread...hreadid=466659 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Sheets("Sheet1").Select Range("A12:E42").Select Selection.Copy Sheets("Sheet2").Activate Range("B10:F40").Select ActiveSheet.Paste Application.CutCopyMode = False Range("a5").Select Copy the code and insert it into the "this workbook" between the lines............. Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel A Boolean) End Sub To get there rightclick onto the excel picture to the left of "File" on the men bar select view code select workbook on the dropdown next to "general" select before save on the dropdown next to "open" paste the code between the lines You can select any other event that may suit you as well as the befor save. "before print" is a good one This code will only work automatically in the this workbook code as it needs to select different sheets -- bill ----------------------------------------------------------------------- bill k's Profile: http://www.excelforum.com/member.php...info&userid=82 View this thread: http://www.excelforum.com/showthread.php?threadid=46665 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Code Needed | New Users to Excel | |||
Code Help Needed | Excel Programming | |||
Better code needed | Excel Programming | |||
Code Fix Needed | Excel Programming |