Thread: Excel 2010 Function Error in VB

  1. #1
    Registered User g8ortech14's Avatar
    Join Date
    Oct 2007
    Location
    Orlando FL
    Posts
    22

    Excel 2010 Function Error in VB

    Having problems with the code below on a 2010 Excel spreadsheet. The function flags me at first line and highlights Mid. I get a "compile error, cannot find project or library". I'm trying to set GetSheetName = m_sSheet but the GetSheetName function is not declared as returning any type. Any suggestions please?


    Code:
    Function GetSheetName(ByVal m_sFormula As String) As String
        Dim m_sSheet As String
        
        m_sSheet = Mid(m_sFormula, 2, InStr(m_sFormula, "!") - 2)
        If InStr(m_sSheet, "'") Then
              m_sSheet = Mid(m_sSheet, 2, Len(m_sSheet) - 2)
        End If
        GetSheetName = m_sSheet
    End Function

  2. #2
    Gawking at stupidity
    Join Date
    Jul 2004
    Location
    Oregon, USA
    Posts
    3,218
    Why are you posting VB on a C# forum?
    If you understand what you're doing, you're not learning anything.

  3. #3
    Registered User g8ortech14's Avatar
    Join Date
    Oct 2007
    Location
    Orlando FL
    Posts
    22
    Quote Originally Posted by itsme86 View Post
    Why are you posting VB on a C# forum?
    So in other words nothing productive to to add so bash the poster for not posting in the correct forum. Your absolutely right. I'll take my question and my patronage elsewhere.

  4. #4
    Gawking at stupidity
    Join Date
    Jul 2004
    Location
    Oregon, USA
    Posts
    3,218
    Quote Originally Posted by g8ortech14 View Post
    So in other words nothing productive to to add so bash the poster for not posting in the correct forum. Your absolutely right. I'll take my question and my patronage elsewhere.
    No help from a C# forum for VB. Why are you surprised? You think we're going to miss your patronage when you can't even post correctly?
    If you understand what you're doing, you're not learning anything.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Errors inside a function C++ 2010 express
    By Nightstaber in forum C++ Programming
    Replies: 14
    Last Post: 12-08-2011, 11:45 PM
  2. Visual Studio 2010 - DirectX compilation error.
    By PieMonster in forum Game Programming
    Replies: 2
    Last Post: 09-04-2011, 01:44 PM
  3. VC++ 2010 Error
    By Arpan Das in forum C++ Programming
    Replies: 12
    Last Post: 06-26-2011, 04:52 AM
  4. Problem using DLL Function imports in VS .NET 2010 C++
    By neilc in forum C++ Programming
    Replies: 2
    Last Post: 05-17-2011, 12:12 AM
  5. Compiler Error in Visual Studios 2010
    By ScottyK in forum C++ Programming
    Replies: 5
    Last Post: 11-21-2010, 12:54 PM