+ Reply to Thread
Results 1 to 5 of 5

Global Reference Error

  1. #1
    Registered User
    Join Date
    07-14-2010
    Location
    New York, USA
    MS-Off Ver
    Excel 2000
    Posts
    18

    Global Reference Error

    hello,

    I use a reference to the workbook file name in code that I use to hide different sheets. However, the name of the workbook will change when different users use it. I need to write a code that can hide worksheets without a reference to the file name and without a global reference error.

    Thanks A lot!!!

  2. #2
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Global Reference Error

    Probably easiest if you can post the code that you are using.

    Dom
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

  3. #3
    Registered User
    Join Date
    07-14-2010
    Location
    New York, USA
    MS-Off Ver
    Excel 2000
    Posts
    18

    Re: Global Reference Error

    HTML Code: 

  4. #4
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Global Reference Error

    You shouldn't need to refer to the workbook if the code is, as I assume, working on a worksheet change event and hiding the sheets within the workbook that contains the code.

    Please Login or Register  to view this content.

    Dom

  5. #5
    Registered User
    Join Date
    07-14-2010
    Location
    New York, USA
    MS-Off Ver
    Excel 2000
    Posts
    18

    Re: Global Reference Error

    Thanks a lot. I guess I just need to start getting in the habit of writting the code in single lines.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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