G
Guest
hi
i want to select a few sheets and move it before a sheet
name total.
i have to program as :
Sheets(Array("Q1 2005", "Q2 2005", "Q3 2005")).Select
Sheets(Array("Q1 2005", "Q2 2005", "Q3 2005")).Move
After:=Sheets(9)
i am successful is forming the string
Sheets(Array("Q1 2005", "Q2 2005", "Q3 2005")) by the code
as:
str = ""
For n = 1 To m
If n = m Then comStr = "" Else comStr = ","
If n = 1 Then begStr = "Sheets(Array(" Else begStr = ""
If n = m Then endStr = "))" Else endStr = ""
str = begStr & str & """" & arrSh(n) & """" & comStr &
endStr
Next n
Debug.Print str
str final output would be as:
"Sheets(Array("Q1 2005", "Q2 2005", "Q3 2005"))"
but i am unable to use this str... likfe i want to now do
as str.select. how to acheive that
i hope i am clear
i want to select a few sheets and move it before a sheet
name total.
i have to program as :
Sheets(Array("Q1 2005", "Q2 2005", "Q3 2005")).Select
Sheets(Array("Q1 2005", "Q2 2005", "Q3 2005")).Move
After:=Sheets(9)
i am successful is forming the string
Sheets(Array("Q1 2005", "Q2 2005", "Q3 2005")) by the code
as:
str = ""
For n = 1 To m
If n = m Then comStr = "" Else comStr = ","
If n = 1 Then begStr = "Sheets(Array(" Else begStr = ""
If n = m Then endStr = "))" Else endStr = ""
str = begStr & str & """" & arrSh(n) & """" & comStr &
endStr
Next n
Debug.Print str
str final output would be as:
"Sheets(Array("Q1 2005", "Q2 2005", "Q3 2005"))"
but i am unable to use this str... likfe i want to now do
as str.select. how to acheive that
i hope i am clear