View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
circuit_breaker circuit_breaker is offline
external usenet poster
 
Posts: 13
Default Retrieving values from another sheet

Hi,

My VBA script needs to get 4 values from another sheet which contains
4 pivot tables. Specifically, I need to get the values next to "Grand
Total" in each pivot table. The sheet is auto-generated by another
script and no named cells are in use here.

I've been able to get to the last used cell but no futher:

Set mySheet = Workbooks(wbName).Sheets(wsName)
lastRow = mySheet.Cells.SpecialCells(xlCellTypeLastCell).Row

I could use the { Cells.Find(What:="Grand Total",... } function but
this would involve to activate the sheet containing the pivot tables
first and I'd like to avoid that.

Thanks for your help.