Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Find, Copy and Paste question

Hello

My goal is to copy information from one sheet to another, based upon a name
I select. This code does it, but what I would like to do is put the game
numbers in the first row and paste the copied information after. I have tried
and get an error about the cell is not big enough, and I should select a
larger area to paste into.

I have tried setting the range, and still get the error, how do I work
around this? trying the offset(0,1) gave me the same error. I now put the
game number into row twenty six, should I cut that and then insert it into
the a row?

Thanks,

Dim strPlayersName As String
'get the players name
strPlayersName = InputBox("Type in a players Name!", "Players SuperStats")
Dim intRow As Variant
Dim intRowA As Variant
Dim strName As String
Dim rngcurrent As Range
intRowA = 3

For i = 2 To Sheets.Count ' Provides a count of
all worksheets

Cells.Find(What:=strPlayersName, After:=ActiveCell,
LookIn:=xlValues, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:= _
False, SearchFormat:=False).Activate
intRow = ActiveCell.Row
Rows(intRow).Select
Selection.Copy
strName = ActiveSheet.Name

Windows("Player Stats.xls").Activate
Rows(intRowA).Select
ActiveSheet.Paste

Cells(intRowA, 26).Value = strName
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.WrapText = False
.Orientation = 0
.AddIndent = False
.ShrinkToFit = False
.MergeCells = False
'.FontName = "Arial"
'.Size = "8"
End With
Cells(ActiveCell.Row + 1, ActiveCell.Column).Select
intRowA = ActiveCell.Row
Windows("Canucks 2005 Superstats BU.xls").Activate
Sheets(i).Select
Cells.FindNext(After:=ActiveCell).Activate
Rows(intRow).Select


Next

--
Peace,

Richard
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
Find Copy and Paste [email protected] New Users to Excel 0 July 3rd 07 02:10 PM
Find, copy and paste ufo_pilot Excel Discussion (Misc queries) 3 September 7th 06 10:34 AM
Help! Find info then copy and paste Simon Excel Programming 1 May 11th 05 03:56 PM
Find, Copy, Paste Into Different Workbooks Blue Excel Programming 0 September 28th 04 11:56 PM


All times are GMT +1. The time now is 12:52 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"