Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The below working code opens the workbook and pastes cells as links from
another workbook. How can I make the below operation work without having to actually open the workbook located in '"Workbooks.Open Worksheets(4).Range("A6").Value"? Workbooks.Open Worksheets(4).Range("A6").Value Range("A1").Select ActiveSheet.Paste Link:=True Thank you Todd Huttenstine |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Todd, :-)
You can use Application.ExecuteExcel4Macro, something like.. Code: -------------------- Sub Test1() Dim strTarget As String strTarget = "'" & "CHANGE HERE TO FULL PATH to Book2.xls" & "\[Book2.xls]Sheet4'!R6C1" Selection.Value = Application.ExecuteExcel4Macro(strTarget) End Sub -------------------- --- Message posted from http://www.ExcelForum.com/ |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Todd,
If you want a value from closed workbook then try this, Sub Test() ActiveCell.Formula = "='c:\mypath\[mywbname.xls]mysheetname'!a1" 'to remove link convert it to value ActiveCell.Value = ActiveCell.Value End Sub Regards, Shah Shailesh http://members.lycos.co.uk/shahweb/ *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I stop blank workbook from opening when opening an existing | Excel Discussion (Misc queries) | |||
Code for opening a workbook at a specific time!?! | Excel Discussion (Misc queries) | |||
How to make the opening of a workbook conditional upon the opening of another workbook | Excel Programming | |||
How to make opening of workbook conditional of opening of another workbook | Excel Programming | |||
Code for Opening a Closed Workbook | Excel Programming |