Hey All!
I have my trusty old glorified copy and paste code but I am looking to link the line that has my Workbook name to a cell in one of my sheets. Can't seem to figure it out.
Anyone know how to do this?
And as always, if you spot any inefficiencies/upgrades to my code please add suggestions!
Thank you!
I have my trusty old glorified copy and paste code but I am looking to link the line that has my Workbook name to a cell in one of my sheets. Can't seem to figure it out.
VBA Code:
Sub GrabIndEquity()
'Update Data
Workbooks.Open Filename:= _
"T:\FILE1\FILE2\FILE3\FILE4\FILE5\DATABASE FILE.xlsm"
Cells.Select
Selection.Copy
Windows("SUBJECT PROPERTY.xlsm").Activate
' I want to link the above Workbook name to a cell, IE, "SUBJECT PROPERTY"=to a cell in my workbook. Say Cell $A$1.
ActiveWorkbook.Worksheets("EQ").Activate
Range("A1").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Windows("DATABASE FILE.xlsm").Activate
ActiveWorkbook.Close
'ActiveWorkbook.Save
MsgBox ("EQ Data Has Been Updated")
End Sub
And as always, if you spot any inefficiencies/upgrades to my code please add suggestions!
Thank you!