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: 3,885
Default Pass a range to a method?

Hi
maybe the following is what you're trying to do?
Sub testit()
Debug.Print "Result: ", Test(Range("test"))
End Sub

Function Test(retireDate As Range)
Dim foo
foo = retireDate.Name
Test = foo
End Function

--
Regards
Frank Kabel
Frankfurt, Germany


Lucifer wrote:
I am trying to write a function that will take a different action
based upon the name of a range passes to it. As I understand it the
Range.Name returns a Name object. However, I can't get by the
invalid use of Property

Sub testit()
Debug.Print "Result: ", Test(Range("Retire_Date_Primary"))
End Sub

Function Test(retireDate As Range) As Integer
Dim foo As Name
foo = retireDate.Name
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
How do I pass series data x-value range to a chart from a cell? Ian Charts and Charting in Excel 1 March 3rd 06 04:10 PM
How to (re)set a range.value to pass -0- to a "double" variable Dennis Excel Discussion (Misc queries) 2 April 15th 05 11:13 AM
Pass string as Parameter in OpenText method No Name Excel Programming 0 January 8th 04 06:22 AM
Can we Pass String to FieldInfo Array to OpenText Method. Niraj Kumar Singh Excel Programming 0 January 8th 04 05:35 AM
Pass file name from Spreadsheet Range Bruce Roberson Excel Programming 5 August 16th 03 12:10 AM


All times are GMT +1. The time now is 04:24 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"