correction on the last command.

Sub CanSomeOneHelp()
   Dim RgDest As Range

   With Workbooks("Anodize.xls").Sheets(1)
      .Unprotect
      Set RgDest = .Cells(1).CurrentRegion
   End With
   Set RgDest = RgDest.Cells(RgDest.Rows.Count + 1, 1)

   Workbooks("Quote.xls").Sheets(1).Cells(1).CurrentRegion.Copy RgDest
   RgDest.Parent.Protect
   Application.CutCopyMode = False
   *Workbooks("Quote.xls").Sheets(1).Cells(1).CurrentRegion.ClearContents*
End Sub



On Wed, Apr 20, 2011 at 7:51 AM, STDEV(i) <setiyowati.d...@gmail.com> wrote:

> assuming that the both workbooks are openned
>
> Sub CanSomeOneHelp()
>    Dim RgDest As Range
>
>    With Workbooks("Anodize.xls").Sheets(1)
>       .Unprotect
>       Set RgDest = .Cells(1).CurrentRegion
>    End With
>    Set RgDest = RgDest.Cells(RgDest.Rows.Count + 1, 1)
>
>    Workbooks("Quote.xls").Sheets(1).Cells(1).CurrentRegion.Copy RgDest
>    RgDest.Parent.Protect
>    Application.CutCopyMode = False
>    RgFrom.ClearContents
>  End Sub
>
>
> On Tue, Apr 19, 2011 at 7:02 AM, Dick <bobde...@yahoo.com> wrote:
>
>> Can someone help with the following: In one workbook named (Quote) I
>> would like to copy the contents of Columns A and B to another workbook
>> named (Anodize). Where the copied contents from (Quote) would be
>> placed on the next available blank row in Sheet1 Columns A and B. I
>> know how to place a Command button on the (Quote) workbook. I just
>> don't know how to code it. Once command button is clicked:
>> 1.)Copy contents from Column A and B from (Quote) Workbook Sheet1
>> 2.)Clear contents from Column A and B from (Quote) Workbook Sheet1
>> 3.)Unprotect Workbook from (Anodize) Sheet1
>> 4.)Paste contents from Column A and B from (Quote) Workbook Sheet1 TO
>> (Anodize) Sheet1 Column A and B NEXT AVAILABLE(EMPTY) ROW.
>> 5.) Protect Workbook (Anodize) Sheet1
>> Thanks so much for any help!!!
>>
>>

-- 
----------------------------------------------------------------------------------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel

Reply via email to