Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Code needed big time!


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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Code needed big time!

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Code needed big time!


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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Code Needed John Calder New Users to Excel 10 July 15th 09 11:42 PM
Code Help Needed Michael168[_116_] Excel Programming 2 September 18th 04 05:28 PM
Better code needed ceplane Excel Programming 6 May 10th 04 07:59 PM
Code Fix Needed Phil Hageman[_3_] Excel Programming 2 February 28th 04 01:16 AM


All times are GMT +1. The time now is 04:24 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"