+ Reply to Thread
Results 1 to 3 of 3

How to reference other worksheet using a macro?

  1. #1
    Registered User
    Join Date
    07-13-2013
    Location
    Mumbai
    MS-Off Ver
    Excel 2007
    Posts
    2

    How to reference other worksheet using a macro?

    Hello,

    I am developing a macro, whereby I need to reference other workbook, say slave.xls from the main workbook, say master.xls
    Can somebody give me the macro code to do that?? slave.xls would be closed, only master.xls would be open

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: How to reference other worksheet using a macro?

    Hi, nirav1964,

    as an example (you would need to alter the path to slave.xls):
    Please Login or Register  to view this content.
    Code will open the workbook. Only if this is done it will copy the value from the last row of sheet Data in Column F to the master workbook in sheets Master to the fiorst empty row in Column. A.

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  3. #3
    Registered User
    Join Date
    07-13-2013
    Location
    Mumbai
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: How to reference other worksheet using a macro?

    Thanks, I shall try & revert.
    Thanks again

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Trying to get macro to reference newly copied worksheet
    By creuther in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 12-29-2011, 10:54 PM
  2. Macro to paste a cell reference in another worksheet
    By Stangman in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-11-2011, 06:35 PM
  3. How to reference another worksheet in a Macro
    By jetablack4 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 11-04-2009, 05:32 PM
  4. Formula/Macro to reference from other Worksheet
    By Rizzu in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-09-2009, 12:58 AM
  5. Macro reference change when worksheet renamed ???
    By Southernw2002 in forum Excel General
    Replies: 5
    Last Post: 11-12-2007, 07:24 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1