VBA Refer to worksheet vs chart sheet
I'm trying to write a small function that takes in a filepath (where the workbook was saved at), targetpath (where the pdf will be saved to), and a string of tab names (pipe (|) delimited) in excel. The user of the function doesn't have to input a string of tab names (it's optional) and if they don't, I want to select all of the visible tabs and print them. This would be in the case if the user has 50 charts in separate worksheets and don't want to write a string like "Chart1|Chart2|...." Code: For Each WSO.Name In WBO.Worksheets strSheets = strSheets & WSO.Name & "|" Next WSO strSheets = Left