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: 1
Default Passing a range to a function

Formul in Excel looks like this:
=TestForEach(F7:J8)

Function TestForEach(a As Range)
Dim cell As Range
For Each cell In Range(a)
Msgbox("Hello")
Next
End Function

Whats worg with this picture. I am trying to pass a range of cells from
excel to this function and nothing happens. For some reason I am not using
the "a" range correctly.
 
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
Passing a range to a function Isabelle[_2_] Excel Programming 1 January 23rd 06 10:24 PM
Passing a range into a VBA function Floyd[_2_] Excel Programming 4 February 10th 05 01:29 AM
Passing range as an argument in a function Hari[_3_] Excel Programming 1 June 15th 04 02:41 AM
Passing a Range to a Function Problem Rocky McKinley Excel Programming 4 January 7th 04 02:00 AM
Passing an unkown range to a function Newbie3333 Excel Programming 3 December 5th 03 02:14 AM


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