Leading the way in Microsoft Office Development
 Home|Excel|Word|PowerPoint|Consultancy|Feedback|Contact 
 Microsoft Excel > Functions User Defined > WORKBOOKNAME< Previous | Next > 

 

WORKBOOKNAME([rgeCellRange])

 
 

Returns the name of the active workbook.

 

 
rgeCellRangeA cell in the workbook you want the name of.
 

 

REMARKS

 
 
  • ??

     

     
    1
    2
    3
    4
    5
    6
    7
    8
    9
    Option Explicit

    Public Function WORKBOOKNAME(Optional ByVal rgeCellRange As Range = Nothing) As String
       If objRange Is Nothing Then
          WORKBOOKNAME = ActiveWorkbook.Name
       Else
          WORKBOOKNAME = objRange.Parent.Parent.Name
       End If
    End Function
       

     

    Example

     


     Copyright © 2004-2007 Better Solutions Limited. All Rights Reserved.< Previous | Top | Next >