View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
GS[_2_] GS[_2_] is offline
external usenet poster
 
Posts: 3,514
Default Paste special syntax Book to Book



Just assign the value directly...



RngTo = RngFrm



--

Garry


Well, I sure thought would work, but there must be something upstream
missing.

I tried a RngFrm.Copy just below the first InputBox but that did not
work either.

Here is the whole code.

Howard

Sub CopyBookToBook()

Dim RngFrm As Range
Dim RngTo As Range

Set RngFrm = Application.InputBox(Prompt:="Enter a Copy from Range.",
_ Title:="Enter Copy from Column", Type:=8)
If RngFrm Is Nothing Then Exit Sub

'RngFrm.Copy

Workbooks.Open Filename:= _
"C:\Users\Howard Kittle\Documents\Copy To This Book.xlsm"

Application.Goto Workbooks("Copy To This
Book").Sheets("Sheet1").Range("A1")

Set RngTo = Application.InputBox(Prompt:="Enter a Copy to Range.", _
Title:="Enter Copy to Column", Type:=8)
If RngTo Is Nothing Then Exit Sub

MsgBox RngTo.Address

RngTo = RngFrm

ActiveWorkbook.Save
'ActiveWorkbook.Close

End Sub


Works for me! Note that both ranges must be the same size/shape...

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion