excel macro sheet dropdown error. - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

excel macro sheet dropdown error.

ultimatefish76ultimatefish76 Posts: 1Member
I'm a very green 'programmer' and I'm having some trouble with having a dropdown object in 'sheet1' that I want to display all the sheets titles.

Here is what I have for the code:

Sub dropdown()
Dim Arr() As String
Dim I As Integer
ReDim Arr(Sheets.Count - 1)
For I = 0 To Sheets.Count - 1
Arr(I) = Sheets(I + 1).Name
Next I
AllSheetNames = Arr
End Sub

When I run it, or save it. I get nothing in the dropdown box.


Ps. I got that code from this site as well.
Sign In or Register to comment.