B
Brenda
This is probably super simple, but I just don't have the background to come
up with it as quickly as I need to. I use the Text30 column to add a value
to every task in my project that identifies a team or subteam that the task
belongs to. I want to be able to, through code, find the unique values in
that column to be able to put them into a list. Currently, the code that I
have been using requires the user to go into the code and manually enter the
values that they have used in the Text30 column to then be used as the label
for separate tabs in an Excel workbook (my code exports to Excel.)
I want the code to be able to determine how many unique values are in the
column and to use the values to label the tabs. Below are code snipets. I
got these from someone else in my company, so the original code may actually
have come from this forum at some point in time.
Thanks!
Dim SubteamList(4) As String 'This is the # of different subteams in
the project as identified in Text30 field
(These are what we have to manually change as well as the number in the Dim
statement above)
SubteamList(1) = "Team A"
SubteamList(2) = "Team B"
SubteamList(3) = "Team C"
SubteamList(4) = "Team D"
For Scount = 1 To 4 (this is another place we are setting the number)
Set xlSheet = xlBook.Worksheets.Add
xlSheet.Name = SubteamList(Scount)
up with it as quickly as I need to. I use the Text30 column to add a value
to every task in my project that identifies a team or subteam that the task
belongs to. I want to be able to, through code, find the unique values in
that column to be able to put them into a list. Currently, the code that I
have been using requires the user to go into the code and manually enter the
values that they have used in the Text30 column to then be used as the label
for separate tabs in an Excel workbook (my code exports to Excel.)
I want the code to be able to determine how many unique values are in the
column and to use the values to label the tabs. Below are code snipets. I
got these from someone else in my company, so the original code may actually
have come from this forum at some point in time.
Thanks!
Dim SubteamList(4) As String 'This is the # of different subteams in
the project as identified in Text30 field
(These are what we have to manually change as well as the number in the Dim
statement above)
SubteamList(1) = "Team A"
SubteamList(2) = "Team B"
SubteamList(3) = "Team C"
SubteamList(4) = "Team D"
For Scount = 1 To 4 (this is another place we are setting the number)
Set xlSheet = xlBook.Worksheets.Add
xlSheet.Name = SubteamList(Scount)