Paste special syntax Book to Book
Hi Howard,
Am Sun, 20 Jul 2014 20:28:45 -0700 (PDT) schrieb L. Howard:
Before changing the RngTo = RngFrm from RngFrm.Copy RngTo all I had to do was select a single cell, and it would be the upper left cell of any size range.
try:
Sub CopyBookToBook()
Dim RngFrm As Range
Dim RngTo As Range
Dim arrFrm As Variant
Set RngFrm = Application.InputBox(Prompt:="Enter a Copy from Range.", _
Title:="Enter Copy from Column", Type:=8)
If RngFrm Is Nothing Then Exit Sub
arrFrm = RngFrm
'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 single cell.", _
Title:="Enter Copy to Column", Type:=8)
' If RngTo Is Nothing Then Exit Sub
MsgBox RngTo.Address
RngTo.Resize(UBound(arrFrm), 1) = arrFrm
'ActiveWorkbook.Save
'ActiveWorkbook.Close
End Sub
Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional
|