Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a function very similar to this. The data that I'm passing in is
a sheet codename. i.e LSheetname = sh_MTD_Cost_Detail. When I try to set the worksheet (here anySheet) my code errors out. I've been trawling the web for 2 days looking for the solution. Does anyone have any ideas about how to solve this? Many Thanks in advance!! :) Function fncGetData(LSheetname As String) As Variant Dim anySheet as Worksheet Set anySheet = ThisWorkbook.Worksheets(LSheetname) fncGetData = anySheet.Cells(1, 1).Value set anySheet=Nothing End Function *** Sent via Developersdex http://www.developersdex.com *** |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel Message "user defined type not defined" | Excel Discussion (Misc queries) | |||
How do you save and share "user-defined chart type's" in Excel? | Charts and Charting in Excel | |||
How do you save and share "user-defined chart type's" in Excel? | Charts and Charting in Excel | |||
"User-defined type not defined" error when trying to send e-mail | Excel Programming | |||
Excel "Insert Formula" dialog always call my user defined function | Excel Programming |