bdsii
03-01-2010, 08:45 AM
All - I have a series of worksheets that begin with the same 7 characters of "Budget-" followed by their month and year making up the worksheet name.
I would like to use xlSheetVeryHidden for them but do not want to have to call each one out specifically each time a new one is added.
I want to convert the code below to one that will hide any worksheet beginning with "Budget-". This is similar to a wildcard being used in the sheet name.
Worksheets("Budget-Jan2010").Visible = xlSheetVeryHidden
I played around with adding in some fashion the code below to the xlSheetVeryHidden command but could not get it to work.
Left$(wk.Name, 7) <> "Budget-"
Any ideas how to accomplish this ? Can a wildcard be used in this command or would the Left$ function be needed ?
thanks !
I would like to use xlSheetVeryHidden for them but do not want to have to call each one out specifically each time a new one is added.
I want to convert the code below to one that will hide any worksheet beginning with "Budget-". This is similar to a wildcard being used in the sheet name.
Worksheets("Budget-Jan2010").Visible = xlSheetVeryHidden
I played around with adding in some fashion the code below to the xlSheetVeryHidden command but could not get it to work.
Left$(wk.Name, 7) <> "Budget-"
Any ideas how to accomplish this ? Can a wildcard be used in this command or would the Left$ function be needed ?
thanks !