shabbyporpoise
New Member
- Joined
- Jul 22, 2011
- Messages
- 26
Hello Forum I'm new to excel vba, I have been using this forum quite a bit to search for similar problems. I have found the forum very helpful. With my work we use excel quite a bit, and my employer wants me to learn vba to streamline the worksheets we use. My program has nothing to do with work, it is a personal project however everything would apply to work as well. back story done. I am encountering a Runtime error 1004 "Application-defined or object-defined error I have a list of 500 movies in column A, I am trying to have a loop that goes through the entire list, stops when there are no more items and put all of these items in an array. Thanks for your help forum ---------------------- Option Explicit Sub movieList() Dim num As Integer, names As String, i As Integer Dim rowCount As Variant, myMovies() As Variant i = 0 Do Until IsEmpty(Cells(i, 1)) rowCount = Array("a1" & i) myMovies(i) = Cells(i, 2).Value i = i + 1 MsgBox myMovies(i) Loop End sub -----------------