View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Barb Reinhardt Barb Reinhardt is offline
external usenet poster
 
Posts: 3,355
Default link in excel macro

This should get you started:

Sub test()
Dim myWS As Worksheet
Dim aWS As Worksheet

Set aWS = ActiveSheet

Set myWS = Nothing
On Error Resume Next
Set myWS = Worksheets("Sheet2")
On Error GoTo 0
If Not myWS Is Nothing Then
'Reference cells in myWS
aWS.Cells(1, 1) = myWS.Cells(1, 1) '<~~~change this as needed
End If


End Sub

HTH,
Barb Reinhardt
"matt" wrote:

I have an excel macro that needs to get data from a different worksheet. I
can add a link successfully in in my workbook that grabs data from another
workbook, but I dont know the context in the vb editor

can anyone help me??
--
matt