Hi,
I will like to copy data from closed workbook (bbb.xls) to Open workbook (aaa.xls) without opening bbb.xls.
Code below work find for that.
Code:
Sub GetDataFrombbb()
With Range("F4")
.Formula = "='" & ThisWorkbook.Path & "\[bbb.xls]Sheet1'!$N$11"
.Value = Range("f4").Value
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.Borders.LineStyle = xlContinuous
.Borders.Weight = xlThin
End With
End Sub
How to upgrade the code above to enable it to copy updated data from closed workbook (such as usingformula that give row count from N and use that to copy the formula down)
Please help as I am no able to write out the VBA langauge.
Thanks in advance
I will like to copy data from closed workbook (bbb.xls) to Open workbook (aaa.xls) without opening bbb.xls.
Code below work find for that.
Code:
Sub GetDataFrombbb()
With Range("F4")
.Formula = "='" & ThisWorkbook.Path & "\[bbb.xls]Sheet1'!$N$11"
.Value = Range("f4").Value
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.Borders.LineStyle = xlContinuous
.Borders.Weight = xlThin
End With
End Sub
How to upgrade the code above to enable it to copy updated data from closed workbook (such as usingformula that give row count from N and use that to copy the formula down)
Please help as I am no able to write out the VBA langauge.
Thanks in advance