+ Reply to Thread
Results 1 to 8 of 8

Referencing a different tab in VBA code

  1. #1
    Forum Contributor
    Join Date
    06-07-2018
    Location
    Newcastle Upon Tyne, England
    MS-Off Ver
    365
    Posts
    143

    Referencing a different tab in VBA code

    Trying to reference a different tab/sheet to the current sheet with code on.

    Please Login or Register  to view this content.
    Name of the sheet highlighted in yellow text.

    Thanks

  2. #2
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,128

    Re: Referencing a different tab in VBA code

    How about
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    06-07-2018
    Location
    Newcastle Upon Tyne, England
    MS-Off Ver
    365
    Posts
    143

    Re: Referencing a different tab in VBA code

    That's not working unfortunately but I appreciate you looking into it for me.

  4. #4
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,292

    Re: Referencing a different tab in VBA code

    It will work assuming that is what is shown on the sheet tab. What's happening?
    Remember what the dormouse said
    Feed your head

  5. #5
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,128

    Re: Referencing a different tab in VBA code

    That's not working unfortunately
    In what way?

  6. #6
    Forum Contributor
    Join Date
    06-07-2018
    Location
    Newcastle Upon Tyne, England
    MS-Off Ver
    365
    Posts
    143

    Re: Referencing a different tab in VBA code

    The dial is not moving at all so it's not picking up the reference of "F2" from "Speedometers" tab. It was working when the speed dial was on the same tab as the cell I'm referencing but I'm currently building a Dashboard so needed to cut and paste the chart over.

  7. #7
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,128

    Re: Referencing a different tab in VBA code

    Can you supply a sample workbook.

  8. #8
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,292

    Re: Referencing a different tab in VBA code

    If you're not getting an error, then the code is correct, so something else is at play. Where is the cell that you are changing to trigger the code? If it's on the Speedometers sheet, then the code needs to be in that sheet and it's the other sheet reference that needs to change.

+ 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. VBA Help - Code referencing another sheet
    By imchristiiiiina in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-23-2019, 05:09 PM
  2. [SOLVED] VBA Code Referencing a cell
    By cosmica67 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-22-2019, 07:24 PM
  3. Code referencing another Cell
    By vzwtester in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-13-2013, 01:00 PM
  4. Optimizing the Vlookup code in VB. Repitive code with different referencing range.
    By raknahs in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-23-2010, 05:03 PM
  5. Referencing dates in VBA code
    By neadbecker in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-19-2009, 08:34 PM
  6. referencing different sheet in code
    By maacmaac in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-11-2008, 11:29 AM
  7. code for cell referencing in VBA
    By KK1811 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-30-2007, 03:21 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