View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
anilsolipuram[_120_] anilsolipuram[_120_] is offline
external usenet poster
 
Posts: 1
Default Having troubles using visual basic to paste info from one workbook to another


i am assuming that NEW_BOM.xls is the workbook to which you want to cop
the values.

And macro is in the workbook from which you want to copy.

NEW_BOM.xls file has to be opened for this macro to work or
alternately you can write to open it and execute this macro.



Dim Markone As String
Dim Marktwo As String
Dim Markthree As String
Dim Markfour As String
Dim Markfive As String
Dim NewRow As String
Markone = Range("A12").Value
Marktwo = Range("A13").Value
Markthree = Range("A14").Value
Markfour = Range("A15").Value
Markfive = Range("A16").Value
With Workbooks("NEW_BOM.xls").Worksheets("GIRDER")
.Cells(12, 1).Value = Markone
.Cells(14, 1).Value = Marktwo
.Cells(16, 1).Value = Markthree
.Cells(18, 1).Value = Markfour
.Cells(20, 1).Value = Markfive

End With

End Su

--
anilsolipura
-----------------------------------------------------------------------
anilsolipuram's Profile: http://www.excelforum.com/member.php...fo&userid=1627
View this thread: http://www.excelforum.com/showthread.php?threadid=38280