View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
Buzz Local#30 Buzz Local#30 is offline
external usenet poster
 
Posts: 15
Default Chk sheet exits, copy all to another book.

Hey I was just looking through this form and came across this thread it
intersted me as I was trying to think of a way to do something close to if
not the exact same as what you descussing here
Ok so I guess my question if no one objects to me asking is will that code
cope just the value of a formular meaning the end result? or will it copy a
formular also cause I could use something that would copy and add certain
colums of cells and certain cells either to a new workbook or the same
workbook in order to make excell apear to remember info
"Joel" wrote in message
...
Try changing this one statement. When copying multiple cells use the copy
method source.copy destination:=dest

from
rngCopyTo.Value = rngCopyFrom.Value
to
rngCopyFrom.copy destination:=rngCopyTo

"Karen53" wrote:

Hi,

I am trying to copy everything on these three pages on to another sheet
in
another workbook. I'm having trouble getting this to work. Can I do it
this
way?

ictr = 0

For ictr = 1 To 3
Debug.Print ictr

On Error Resume Next
Select Case ictr
Case 1
Set rngCopyFrom = wbkCopyFrom.Notespg.Cells
Set rngCopyTo = wbkCopyTo.Notespg
Case 2
Set rngCopyFrom = wbkCopyFrom.Firstpg.Cells
Set rngCopyTo = wbkCopyTo.Firstpg
Case 3
Set rngCopyFrom = wbkCopyFrom.Lastpg.Cells
Set rngCopyTo = wbkCopyTo.Lastpg
End Select

On Error GoTo 0
If rngCopyFrom Is Nothing Then
'do nothing
Else
rngCopyTo.Value = rngCopyFrom.Value
End If

Next


--
Thanks for your help.
Karen53