LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 516
Default link in excel macro

Thanks Barb - you're the greatest!!! Im still new at this and you just got me
through this!
--
matt


"Barb Reinhardt" wrote:

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

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to link a macro to a button on the excel sheet Neo Excel Discussion (Misc queries) 1 June 16th 06 05:04 PM
using macro that will link into web Conditional Formatting Excel Discussion (Misc queries) 0 May 11th 06 11:25 PM
Record Excel 2003 Macro to link two documents Dajana Excel Discussion (Misc queries) 1 August 23rd 05 02:11 AM
How to link an excel macro from my web page? bmc Excel Discussion (Misc queries) 0 March 2nd 05 05:31 PM
Macro updates and link goes #REF! ??? Rob Smith Links and Linking in Excel 1 February 16th 05 01:03 PM


All times are GMT +1. The time now is 09:02 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"