+ Reply to Thread
Results 1 to 7 of 7

Code change from sheet name to Sheet number

  1. #1
    Forum Contributor
    Join Date
    12-21-2013
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    387

    Code change from sheet name to Sheet number

    Hi,
    I have record a macro as

    Please Login or Register  to view this content.
    its work fine but I want change it from Sheet name to Sheet Number

    ie: My Sheet number 4 and Sheet Name is "Costing".
    My English is very poor, so please be patient >_<"

    Thanks & Regards.
    hkbhansali

  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,423

    Re: Code change from sheet name to Sheet number

    Do you mean something like:

    Please Login or Register  to view this content.
    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
    12-21-2013
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    387

    Re: Code change from sheet name to Sheet number

    Hi TMS,

    I want formula run with sheet number, so user can change sheet name.

  4. #4
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Code change from sheet name to Sheet number

    Change the sheet reference by the sheet's CodeName
    Something like
    Please Login or Register  to view this content.
    by
    Please Login or Register  to view this content.
    See in VBA Project Explorer the correspondance between sheet's name and Sheet' codename
    Sheet's Codename is like Sheet1, Sheet2 etc..
    Sheet's name is in parenthesis
    - Battle without fear gives no glory - Just try

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

    Re: Code change from sheet name to Sheet number

    How about
    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    12-21-2013
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    387

    Re: Code change from sheet name to Sheet number

    Hi Fluff13,

    Thanks a lot...it's work perfect what I want, Thanks again.

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

    Re: Code change from sheet name to Sheet number

    Glad we could help & thanks for the feedback

+ 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] issue with number formating in actual vba copy code from 1 sheet to another sheet
    By JEAN1972 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-11-2017, 10:35 AM
  2. Replies: 2
    Last Post: 01-01-2015, 09:38 PM
  3. [SOLVED] Automatically change sheet number when first sheet is filled in.
    By Bikeman in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-29-2014, 04:36 PM
  4. [SOLVED] User inputs number on sheet 1 and multiple cells (from sheet 2) are shown on sheet 3
    By rimshot609 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-31-2014, 12:54 AM
  5. Replies: 6
    Last Post: 11-05-2012, 10:04 AM
  6. Replies: 2
    Last Post: 06-25-2012, 09:30 AM
  7. [SOLVED] Sheet change code
    By Gordon in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-03-2006, 06:21 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