View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
[email protected][_2_] gimme_this_gimme_that@yahoo.com[_2_] is offline
external usenet poster
 
Posts: 236
Default Excel Macro user function used in several sheets in same workbook

Modify your definition of UltimaFetcha:

UltimaFetcha (new Date,"some text", ThisWorkbook.Sheets("sheetname")

Function UltimaFecha(Fecha As Date, celda As String, sheet as
WorkSheet) As Date
Application.Volatile
* Fecha = sheet.Cells(sheet.Cells.Rows.Count, celda).End(xlUp).Value
* UltimaFecha = Fecha
End Function