Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default HELP: Copying and pasting to Sheets...


Dear ExcelTip Experts...

I have created a button on a main sheet. Upon pressin this button, i
will check the values of column C's Cells. If any of the values match
WORKSHEET name, It will copy a variety of cells, and paste it to th
WORKSHEET with the matching name to the cell.

here is my code...

Code
-------------------

Private Sub CmdUpdate_Click()

For Each Sheet In ActiveWorkbook.Sheets
Select Case Sheet.Name
Case "Master Numbers"
' DO NOTHING
Case Else
For Sheetnamerange = 1 To 999
If Sheet.Name = Range("C" & Sheetnamerange) Then
Range("A" & Sheetnamerange & ":B" & Sheetnamerange).Select
Selection.Copy
Sheets(Range("C2").Value).Select
Range("A" & Sheetnamerange + 1 & ":B" & Sheetnamerange + 1).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,_
SkipBlanks:=False, Transpose:=False
Sheets("Master Numbers").Select
Range("D" & Sheetnamerange + 1 & ":H" & Sheetnamerange + 1).Select
Application.CutCopyMode = False
Selection.Copy
Sheets(Range("C2").Value).Select
Range("C" & Sheetnamerange + 1 & ":G" & Sheetnamerange + 1).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,_
SkipBlanks:=False, Transpose:=False
End If
Next




End Select
Next

End Su
-------------------


I just cant get this to work

--
aking198
-----------------------------------------------------------------------
aking1987's Profile: http://www.excelforum.com/member.php...fo&userid=1539
View this thread: http://www.excelforum.com/showthread.php?threadid=31479

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
Copying and Pasting Kokomo Excel Discussion (Misc queries) 1 November 20th 07 02:14 PM
Copying and pasting GARY Excel Discussion (Misc queries) 2 August 22nd 06 10:16 PM
Copying and pasting ??? NorcalTruck Excel Discussion (Misc queries) 3 December 27th 05 08:31 PM
Pasting on Filtered Data Sheets without pasting onto hidden cells CCSMCA Excel Discussion (Misc queries) 1 August 28th 05 01:22 PM
Problem copying range and pasting to multiple sheets Murphy Excel Programming 1 October 9th 03 07:13 PM


All times are GMT +1. The time now is 09:32 AM.

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

About Us

"It's about Microsoft Excel"