Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hola, tengo una macro que me exporta todos mis datos de qlikview a un documento en excel, necesito ayuda en poder hacer que dentro de esa macro pueda renombrar todas las hojas que me abre esta misma macro, espero me puedan brindar el codigo, y que me ayuden en decirme donde poder colocar el codigo dentro de la macro.
Saludos Cordiales Gracias....
Hace ya un tiempo habia utilizado estas dos funciones , si ya tienes el "array" hecho , solo debes mandar a llamar a la primera. Esto se pone en el Macro de VB, espero sirva de algo saludos! :
Private Function Excel_GetSheetByName(ByRef objExcelDoc, sheetName) 'as Excel.Sheet
For Each ws In objExcelDoc.Worksheets
If (trim(ws.Name) = Excel_GetSafeSheetName(sheetName)) then
Set Excel_GetSheetByName = ws
exit function
End If
Next
'// default return value
Set Excel_GetSheetByName = nothing
End Function
'// ________________________________________________________________
Private Function Excel_GetSafeSheetName(sheetName)
'// can be max 31 characters long
retVal = trim(left(sheetName, 31))
Excel_GetSafeSheetName = retVal
End Function