kathyb0527
07-30-2008, 04:05 PM
I have code that copies data by columns from one workbook to another, but now I need to add information to a few individual cells via find (I think). I've made several attempts over the past few days, but I just can't seem to get it. I've tried For statements and If statements, but they didn't return the cell value (rgFound). Now I've gotten the value I want, I can't get it to transfer to the destination workbook. :banghead:
Here is my latest attempt.
WB As Workbook, Dest As Workbook, Rng As Range, Tgt As Range, Rws As Long
Dim c As Range, cel As Range
Dim stStudy As String, stLLOQ As String
Dim stSourcefilename As String
Dim rgFound As Range, rgCalInfo As Range
Set rgFound = WB.Sheets(2).Range("A1:A100").Find("Regression", lookat:=xlPart, LookIn:=xlValues)
Dest.Range("B6") = rgFound.Value
If someone could tell me what I'm doing wrong, I think I could work it out. Also, I'm not sure this is the most efficient way to do this since I have to do it ~9 more times with different finds.
Thanks for your time.
Kathyb0527
Here is my latest attempt.
WB As Workbook, Dest As Workbook, Rng As Range, Tgt As Range, Rws As Long
Dim c As Range, cel As Range
Dim stStudy As String, stLLOQ As String
Dim stSourcefilename As String
Dim rgFound As Range, rgCalInfo As Range
Set rgFound = WB.Sheets(2).Range("A1:A100").Find("Regression", lookat:=xlPart, LookIn:=xlValues)
Dest.Range("B6") = rgFound.Value
If someone could tell me what I'm doing wrong, I think I could work it out. Also, I'm not sure this is the most efficient way to do this since I have to do it ~9 more times with different finds.
Thanks for your time.
Kathyb0527