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: 48
Default How do I pass a worksheets name to function?

I would like to make a function that I can pass the name of a work sheet to
it, so I can use the function for many different uses.


Example:

sub test()

recct = wsreccount("sheet1")

msgbox recct



function wsreccount (wsname as workbook)

wsreccount = wsname.UsedRange.Rows.Count

end function


What would be the right way to do this? This ia a very simple example, but
gets the point across

Thanks
Phil


 
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 to pass variables as arguments of a function Excel-craze Excel Worksheet Functions 1 August 12th 09 11:48 AM
Pass word protecting multipul worksheets within a workbook Terrie Excel Discussion (Misc queries) 1 December 31st 07 09:23 PM
Showing Error when going to pass a function like this Brahmananda Mohanty Excel Worksheet Functions 1 May 6th 07 07:50 AM
Pass variable to NORMINSV function to get only mean value ExcelMonkey Excel Worksheet Functions 3 June 19th 06 06:01 PM
How to pass value between workbooks ? Chanon Excel Programming 3 November 29th 03 06:32 AM


All times are GMT +1. The time now is 06:46 PM.

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"