View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
David P. David P. is offline
external usenet poster
 
Posts: 67
Default Macro to Copy / paste from 1 workbook to another

Thanks Ron. It's getting stuck at bIsBookOpen_RB. I have changed all the file
& sheet names. When you say "database workbook" do you just mean new
workbook? Should I alter the Lr = LastRow (DestSh) and Set DestRange... part?
--
David P.


"Ron de Bruin" wrote:

Hi David

Not have time to test your code now but see if this is working for you
http://www.rondebruin.nl/copy1.htm

See the example
What if the Database sheet is in another workbook

You can use most of the code in the example

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm




"David P." wrote in message ...
I'm using a macro to copy from one workbook to another in the same instance
of Excel. The macro successfully copies the data to the clipboard but does
not proceed to paste it in the new workbook. No error screen pops up it just
doesn't paste. Your help is appreciated. Here is my current macro code:

Sub CopyPasteToNCTthree()
'
' CopyPasteToNCTthree Macro
' Macro recorded 4/20/2009 by _
'
' Keyboard Shortcut: Ctrl+Shift+M
'
Sheets("Installer").Select
Range("O2:O8").Select
Selection.Copy
Workbooks.Open Filename:="C:\Zip Documents\Customers\New Customer
Test.xls"
Range("O2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Range("O2:O8").Select
With Selection
.HorizontalAlignment = xlLeft
.VerticalAlignment = xlCenter
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 1
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Range("O8").Select
End Sub
--
David P.