+ Reply to Thread
Results 1 to 3 of 3

What is the worksheet name when vba and excel don't match up?

  1. #1
    Forum Contributor
    Join Date
    03-08-2011
    Location
    Lubbock, TX, USA
    MS-Off Ver
    MS OFFICE 365 EXCEL, OUTLOOK, WORD, POWERPOINT
    Posts
    194

    What is the worksheet name when vba and excel don't match up?

    I'm slowly learning VBA. I am doing this by watching youtube, reading this forum, reading books allegedly for "non programmers" etc. It's not optimal. But, it is the workable solution for my time and finances.

    Can someone tell me what this means referring to sheet4? I know what vlookup is. But, this code works in the workbook and I cannot find the referenced sheet. I have unhidden all sheets. Obviously it has been renamed to something more english friendly. I suspect it is the Tech ID. Since the vlookup is only two columns and the fields appear to match. But, how do I definitivily see that sheet4 in VBA = Active_Techs (sheetname) in Excel proper?

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,527

    Re: What is the worksheet name when vba and excel don't match up?

    Hi Mr_Phil,

    It is the code name of the sheet.

    If you open the Visual Basic Editor (VBE) i.e. where your macros are by pressing Alt + F8 (press and hold the Alt button then press F8) you'll see the workbook sheets listed in the the Project - VBAProject left-hand panel. The convention is the code name of each sheet followed by the sheet name used in the workbook which is put in brackets.

    It's good practice to code using the code name as this allows for the sheet name in the workbook to be changed without effecting the functionality of the code to be interrupted.

    HTH

    Robert
    ____________________________________________
    Please ensure you mark your thread as Solved once it is. Click here to see how
    If this post helps, please don't forget to say thanks by clicking the star icon in the bottom left-hand corner of my post

  3. #3
    Forum Contributor
    Join Date
    03-08-2011
    Location
    Lubbock, TX, USA
    MS-Off Ver
    MS OFFICE 365 EXCEL, OUTLOOK, WORD, POWERPOINT
    Posts
    194

    Re: What is the worksheet name when vba and excel don't match up?

    Robert, I actually figured it out. Stare at one place long enough and the truth will out. But, your tip on best practice is every bit as valuable as your explanation. I wrote that one down three times so it is locked in. Thank you Sir!

+ 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. Excel Macro to copy and insert lines to a different worksheet and match values
    By wendya in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 06-10-2015, 02:56 PM
  2. Match values between Excel worksheets and copy row to another worksheet
    By Elbob in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-16-2012, 07:20 AM
  3. Help on Application.worksheet.function.match / evaluate+match
    By vidyuthrajesh in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-12-2012, 04:30 PM
  4. Replies: 6
    Last Post: 02-22-2012, 06:00 PM
  5. Excel VBA find, match and append worksheet values?
    By otivo in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-03-2010, 05:42 PM
  6. Replies: 0
    Last Post: 04-11-2006, 02:35 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