+ Reply to Thread
Results 1 to 4 of 4

Modify existing Code.

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    05-10-2011
    Location
    Central Ohio
    MS-Off Ver
    Excel 2000, and 2010
    Posts
    654

    Modify existing Code.

    I would like to modify the following code as follows. I want to have the "Range" return the value in Cell Z2 on a sheet called INDEX.

    Cell Z2 returns a look up value (cell references i.e. I4, I8 etc) derived from a drop down list

    Sub Open_Scoring()
    '
     Open_Scoring Macro
    '
        Sheets("Scoring").Visible = True
        Sheets("Scoring").Select
        Range("H3").Select
    End Sub
    So where in the code "Range", instead of H3 as shown, becomes the value in cell 'INDEX'!Z2.

    Not sure how to write the code to say this.

    Jim O
    Last edited by JO505; 10-12-2014 at 05:25 PM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,912

    Re: Modify existing Code.

    Untested

    Sub Open_Scoring()
    '
     Open_Scoring Macro
    '
        Sheets("Scoring").Visible = True
        Sheets("Scoring").Select
        Range(Sheets("INDEX").Range("Z2").Value).Select
    End Sub

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Contributor
    Join Date
    05-10-2011
    Location
    Central Ohio
    MS-Off Ver
    Excel 2000, and 2010
    Posts
    654

    Re: Modify existing Code.

    Works like a charm,

    Thanks much!

    Jim O

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,912

    Re: Modify existing Code.

    You're welcome.

+ 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. [SOLVED] Help modify existing Copy-Paste code
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-11-2014, 10:03 AM
  2. [SOLVED] Modify existing code to select file instead of select folder
    By Gti182 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-04-2014, 09:41 AM
  3. [SOLVED] Modify Existing Mbr Code to Save to Ext.Workbook
    By Miskondukt in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 03-06-2013, 02:36 PM
  4. Modify an existing Named Range
    By SueJB in forum Excel General
    Replies: 3
    Last Post: 07-12-2012, 06:16 PM
  5. Modify an existing document
    By Bob Kasper in forum Excel General
    Replies: 3
    Last Post: 05-01-2008, 09:30 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