Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Problem with pasting value of a sum | Excel Worksheet Functions | |||
Pasting problem | New Users to Excel | |||
Pasting problem | Excel Discussion (Misc queries) | |||
pasting and one other problem | Excel Discussion (Misc queries) | |||
Problem Pasting | Excel Discussion (Misc queries) |