LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 553
Default Can't pass publically defined variable to a function

I have a variable called "cell" which I have dimensioned as a Range. I also
have a function called AdjustForUniqueFormula. When I pass this public
variable to the funtion

AdjustForUniqueFormula(cell)

I get a Run Time Error 13 Type Mismatch. Why is this?

If AdjustForUniqueFormula(cell) = True Then
Exit Sub
Else
'Do Something........
End if

Public Function AdjustForUniqueFormula()

If UniqueFormulasAdjustChkBx = True Then
If Not IsError(Application.WorksheetFunction.Match(cell.P arent.Name &
"!" & cell.Address, UniqueCellAddressArray3, 0) - 1) Then
AdjustForUniqueFormula = False
Else
AdjustForUniqueFormula = True
End If
Else
AdjustForUniqueFormula = False
End If
End Function


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pass variable to NORMINSV function to get only mean value ExcelMonkey Excel Worksheet Functions 3 June 19th 06 06:01 PM
why is it saying sheetcnt is "variable not defined" how to do a global variable to share over multiple functions in vba for excel? Daniel Excel Worksheet Functions 1 July 9th 05 03:05 AM
Pass a Variable List Of Values To Subroutine or Function Dean Hinson[_3_] Excel Programming 2 January 28th 05 06:49 PM
Pass Variable Question SyrHoop Excel Programming 2 November 10th 04 05:15 PM
publically defined command bar variable problem Joe Excel Programming 1 March 5th 04 02:22 PM


All times are GMT +1. The time now is 06:29 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"