Dear Tim,
I wrote the below sample code. It served the purpose in identifying if the
sheets exist. But because I'm a learner (self study), I was not satisfied
with this below approach as I actually intend to use the "computer's memory"
to remember the names of all the existing sheet name, then cycle through
these memorized names to see if any matches that in the activecell of Column
A Sheet1. So, I thought the word was "array". I wanted to learn more.
Though my below procedure serves the purpose by cycling via For-Next, I'm
still ignorant on how to utilize computer's memory. I've searched my VBA book
& also F1 Help but can't find an appropriate example to grasp. Perhaps, I hv
not understood how to use array yet. That's why I wanted a sample in array(if
any), instead of just the usual For-Next.
My calamity:
I hv absolutely no programming background nor any friends nor colleagues who
can help with "Excel VBA". Absolutely no one to ask. Infact, I know very
little about any applications except with MS Excel (but not in VBA. Still
self studying). And though I work for a very big & prominent company with
7000 workforce, which includes many good & skilled programmers (mainly VB &
VB.net), but absolutely non of them has the slightest knowledge on Excel VBA
(Excel VBA is something almost unheard of in this part of the world, even to
IT people. No one talks about Excel VBA because non hv realized its
potential).
Hope that explains.
Good day.
Private Sub DoesSheetExist()
Dim n As Variant
Do While ActiveCell < ""
For Each n In Sheets
If ActiveCell.Value = n.Name Then _
ActiveCell.Offset(0, 1) = "Present"
Next n
ActiveCell.Offset(1, 0).Select
Loop
End Sub
--
Edmund
(Using Excel XP)
"Tim Williams" wrote:
Why an array?
Tim
"Edmund" wrote in message ...
If possible, it will be excellent if you can demonstrate it with an array.
--
Edmund
(Using Excel XP)