View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
Michiel via OfficeKB.com Michiel via OfficeKB.com is offline
external usenet poster
 
Posts: 48
Default Worksheets("Sheetname").Select refuses to kick in from User Defined function

Hi all,

Thank you so much for helping me!

I am afraid I simplified my actual Function too much. It is a bit more
complicated it uses commands that only can be run on the sheet named
LSheetname.
So, the function does absolutely need to activate that sheet.
A better way to present my function is:

Function fncGetData(LSheetname As String) As Variant
Worksheets(LSheetname).Select
<Do specific actions on the sheet LSheetname
fncGetData = <result of these actions
End Function

And, still, this must be working from a user defined Function in another
sheet.

Thanks!

--
Message posted via http://www.officekb.com