+ Reply to Thread
Results 1 to 3 of 3

Referencing a cell from another worksheet in VBA

  1. #1
    Registered User
    Join Date
    12-17-2013
    Location
    South Africa
    MS-Off Ver
    Excel 2010
    Posts
    39

    Referencing a cell from another worksheet in VBA

    Hi,

    I have a drop down list in sheet 'Reinforcement' located in cell G4. When this cell selection changes, VBA code hides/unhides certain rows.

    In sheet 'summary', i would like to reference the drop down list in 'Reinforcement' in cell G4 to hide/unhide rows. Below is the successful code used when hiding/unhiding rows in 'Reinforcement':

    Please Login or Register  to view this content.
    How do i change this code so that it refers to G4 in the 'Reinforcement' sheet when the code is running in the 'summary' sheet?

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

    Re: Referencing a cell from another worksheet in VBA

    Hi, a-man,

    should only be Sheet Reinforcement be monitored? If so you could add thee same lines to hide/unhoide but add a qualifiers for sheet Summary there like
    Please Login or Register  to view this content.
    If the code should run on either shee I would set a Variable for teh worksheet on which it shuould be hgandled like
    Please Login or Register  to view this content.
    Assuming that both sheets are protected with the same password (otherwise use a variable/array to handle the indivdual passwords).

    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
    12-17-2013
    Location
    South Africa
    MS-Off Ver
    Excel 2010
    Posts
    39

    Re: Referencing a cell from another worksheet in VBA

    Holger - Once again, thank you!

+ 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. Referencing a cell on another worksheet in VBA
    By kthoma85 in forum Excel General
    Replies: 5
    Last Post: 11-30-2013, 03:49 AM
  2. Issue - Referencing every 7th cell from another worksheet
    By alexmblog in forum Excel General
    Replies: 2
    Last Post: 09-28-2011, 09:16 AM
  3. Cell Formatting when referencing worksheet name
    By mlandrie in forum Excel General
    Replies: 2
    Last Post: 09-14-2011, 04:43 PM
  4. Referencing same cell on different worksheet
    By archipelago in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-05-2008, 10:10 AM
  5. [SOLVED] Referencing a cell from another worksheet
    By Mark in forum Excel General
    Replies: 3
    Last Post: 01-27-2006, 05:55 PM

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