Another Dumb Question From Me

Dolemitefunk

New Member
Joined
Oct 12, 2010
Messages
47
So I have this section of code

Set master = ActiveWorkbook
Set factors = master.ActiveSheet
Dim master As Workbook
Dim factors As Worksheet

Set Dest= Workbooks.Open("U:\Dolemitefunk\Testing\Test 1.xls")
Set DestSheet= Dest.Worksheets("Sheet 1")

factors.Range("C5:C66").Copy Destination:=DestSheet.Range("H14:H75")

run;

How would I get this to instead of copy and paste the cells, to link the "datasheet" to the active workbook?

Any help would be greatly appreciated
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
It's somewhat unusual but you can paste a link using the paste method of the worksheet. Since you cannot give a destination when pasting a link, you must select the range of cells where you want to paste the links (in doing so, to avoid an error be sure to activate the workbook, the worksheet, and finally select the range:
Code:
Sub foo()

    Workbooks("Book2.xlsb").Worksheets("Sheet1").Cells(1, 1).Copy
    
    ThisWorkbook.Activate
    Sheet1.Activate
    Cells(1, 1).Activate
    Sheet1.Paste Link:=True

End Sub

As a matter of taste, you might instead just write the formula to the cell...
 
Upvote 0
Thank you for the response, I tried to copy the cell, but the cell has a formula in it, is it possible to set the destination cell equal to the corrosponding cell so that it is linked to the cell that has the formula as opposed to having the formula itself? I hope that made sense. Again thank you for your help
 
Upvote 0

Forum statistics

Threads
1,224,591
Messages
6,179,768
Members
452,940
Latest member
rootytrip

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top