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: 735
Default Worksheet Codenames Passing to Function

Hi All
I wish to pass a worksheet codename to function. How do I do this?

So far......this fails to pass the codename shAIF to the function

Sub Test
MsgBox FindReport(shAIF, "New Report")
End Sub

Function FindReport(searchSh as Worksheet, searchText as String) as Long
FindReport = 0
Dim c
With xSh
Set c = .Cells.Find(xFind, LookIn:=xlValues)
If Not c Is Nothing Then
FindReport = c.address.Row
End If
End With
End Function

--

Regards,
Nigel




 
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 variable to worksheet function [email protected] Excel Programming 0 January 19th 07 11:47 PM
Passing a WorkSheet from a Function??? Mac Lingo Excel Worksheet Functions 3 June 13th 06 08:29 AM
Excel Worksheet Codenames Alasdair Stirling Excel Programming 6 November 2nd 04 07:33 AM
Excel Worksheet Codenames 2 Alasdair Stirling[_2_] Excel Programming 4 November 1st 04 03:46 PM
Using worksheet codenames dan Excel Programming 0 January 22nd 04 09:46 PM


All times are GMT +1. The time now is 11:01 AM.

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

About Us

"It's about Microsoft Excel"