Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

rename worksheet in macro

hi im importin a couple of charts into an excel sheet with a macro!!! in the macro i also want to rename the sheets cause every chart is being copied into another worksheet

regards,

mt

2 Replies
Gysbert_Wassenaar

This will rename the active sheet to abc.

sub RenameSheet

     set sheet=ActiveDocument.ActiveSheet

     set sp=sheet.GetProperties

     sp.Name="abc"

     sheet.setProperties sp

end sub

You can use the sheets collection of the document object (activedocument.sheets) to get the collection of sheets in the document.


talk is cheap, supply exceeds demand
Not applicable
Author

I was talking about a sheet in excel but I already solved the problem and it basicly works the same way you postet it thank you.

regards,

MT