+ Reply to Thread
Results 1 to 3 of 3

Debug Problem, possibly involving sheet names?

  1. #1
    Registered User
    Join Date
    06-06-2007
    Posts
    53

    Debug Problem, possibly involving sheet names?

    Alright, I have a function called ListSheetNames() stored in a sheet named ProjectView (this is the VBA code name, it is titled "Project View" in Excel). I know that all the calls within ListSheetNames() work correctly.

    Please Login or Register  to view this content.
    If I run this function from a button in Excel, assigned to ProjectView.ListSheetNames, then it works properly and runs error-free.

    However, if I try to call the function as the workbook opens via:
    Please Login or Register  to view this content.
    I get a run-time error 1004, highlighting "Call ProjectView.ListSheetNames"

    Alternatively, if I call the function with the following function on another sheet:
    Please Login or Register  to view this content.
    The call to Tester works properly, the call to ListSheetNames generates the list of sheet names as intended, and it yields a 400 error.

    Does anyone have any clue what's going on? My ListSheetNames function works if I run it from a button in Excel, but it gets errors when I call it from other functions. What gives?
    Last edited by svaiskau; 06-12-2007 at 11:55 AM.

  2. #2
    Registered User
    Join Date
    06-07-2007
    Posts
    7
    I have a function called ListSheetNames() stored in a sheet named ProjectView
    If you're calling the funtion from WorkbookOpen, you'll have to put it in a module, not in worksheetcode.

  3. #3
    Registered User
    Join Date
    06-06-2007
    Posts
    53
    Well that is simply untrue.

    Turns out I was hiding the cells before I was uploading it to our shared document space, which resulted in the error. But to debug it, I was unhiding them, which kept it running smoothly. After ruling out just about every other variable possible, I figured it out.

    Thanks though.

+ 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