Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 96
Default Pasting problem

hi

I have a workbook with a button
When the user clicks the button another workbook is opened
and a value in the first workbook is searched for.
Presuming its found, the found range + offset(0,4) is
activated and the user will then be presented with a
message box which they will answer probably answer yes to.

What I want to do now is copy the values from range
(c12:g12) in the first workbook and paste them in the
second workbook without any formats to
range(activecell.offset(0,4) : activecell.offset(0,8))

Does anyone know how to do this, preferably without the
cutcopymode being used.

Many thanks in advance

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Pasting problem

Here is partial code that should help :-

Code:
--------------------

Dim ToRow As Long
Dim ToCol As Integer
Dim FoundCell As Object
Dim FromRange As Range
Dim ToRange As Range
'-------------------------------
Set FromRange = ActiveSheet.Range("C12:G12")
'- do find
'set Foundcell = ... etc. (no need to Activate or Select)
'
' transfer found values
ToRow = FoundCell.Row
ToCol = FoundCell.Column
Set ToRange = Worksheets("sheet2") _
.Range(Cells(ToRow, ToCol + 4), Cells(ToRow, ToCol + 8))
ToRange.Value = FromRange.Value

--------------------



---
Message posted from http://www.ExcelForum.com/

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
Problem with pasting value of a sum adminservicesJY Excel Worksheet Functions 6 January 20th 09 06:50 PM
Pasting problem Niroo New Users to Excel 2 January 20th 09 03:03 PM
Pasting problem nc Excel Discussion (Misc queries) 5 October 18th 07 05:17 PM
pasting and one other problem B_Carpet Excel Discussion (Misc queries) 9 July 29th 05 02:36 AM
Problem Pasting Duke Excel Discussion (Misc queries) 4 April 9th 05 06:23 PM


All times are GMT +1. The time now is 01:58 PM.

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"